diff --git a/auto/auto b/auto/auto index a8727de..fadf87d 100755 --- a/auto/auto +++ b/auto/auto @@ -32,6 +32,10 @@ cd clang-format ./clang-format cd .. +cd yapf +./yapf +cd .. + cd home-chmod ./home-chmod cd .. diff --git a/auto/yapf/style b/auto/yapf/style new file mode 100644 index 0000000..13c6123 --- /dev/null +++ b/auto/yapf/style @@ -0,0 +1,5 @@ +[style] +use_tabs = true +column_limit = 100 +continuation_align_style = fixed +continuation_indent_width = 1 diff --git a/auto/yapf/yapf b/auto/yapf/yapf new file mode 100755 index 0000000..c2f0e5d --- /dev/null +++ b/auto/yapf/yapf @@ -0,0 +1,3 @@ +#!/bin/sh -e +mkdir -p ~/.config/yapf +mv -i style ~/.config/yapf/ diff --git a/manual/helix/helix b/manual/helix/helix index 17bedad..e8565d2 100755 --- a/manual/helix/helix +++ b/manual/helix/helix @@ -104,4 +104,13 @@ language-servers = [ "ltex-ls" ] file-types = ["md"] scope = "source.markdown" roots = [] + +[[language]] +name = "python" +indent = { tab-width = 4, unit = "\t" } +formatter = { command = "yapf3" } +auto-format = true + +[language-server.pylsp.config.pylsp.plugins] +pycodestyle.enabled = false EOF diff --git a/setup/fedora-install.md b/setup/fedora-install.md index 90a7d1c..4ca5565 100644 --- a/setup/fedora-install.md +++ b/setup/fedora-install.md @@ -1,9 +1,14 @@ -# Fedora 39 Installation +# Fedora Installation -Here is how I installed Fedora 39. I chose to migrate from ext4 to btrfs, the +Here is how I installed Fedora. I chose to migrate from ext4 to btrfs, the default file system for Fedora. I also bought a new disk, which means that I needed to create everything from scratch. +_Note: This document details the installation only. For setup, see +[Fedora System Setup](fedora-system-setup.md) or +[Fedora User Setup](fedora-user-setup.md). This is originally written +for Fedora 39 and updated to Fedora 40._ + By following these steps, you will be able to install Fedora with: - `/` as a btrfs subvolume using xxhash as the checksum function on LUKS2 (an encryption layer) diff --git a/setup/fedora-system-setup.md b/setup/fedora-system-setup.md index a89f4ed..ce8cd6d 100644 --- a/setup/fedora-system-setup.md +++ b/setup/fedora-system-setup.md @@ -1,10 +1,11 @@ -# Fedora 39 System Setup +# Fedora System Setup Congratulations on your new install! Now, let's set the system up. -_Note: this document details the system level setup only. For user level setup +_Note: This document details the system level setup only. For user level setup that is remembered in the user home directories, see -[Fedora 39 User Setup](fedora-user-setup.md)._ +[Fedora User Setup](fedora-user-setup.md). This is originally written for +Fedora 39 and updated to Fedora 40._ Rename your system in `Settings` -> `About`. @@ -22,12 +23,20 @@ wl-clipboard qrencode xournalpp gstreamer1-plugins-bad-free-extras gnome-extensions-app gnome-shell-extension-gsconnect nautilus-gsconnect kernel-tools mozilla-openh264 gstreamer1-plugin-openh264 trash-cli ripgrep gnome-tweaks goldendict-ng gcc-c++ gimp alacritty clang clang-tools-extra bat -quearcode qpdf lm_sensors kdenlive` +helix fish kdiskmark kiwix-desktop` ### As needed `dnf install gnome-usage install rlwrap mediainfo nmap xeyes progress -duperemove memtest86+` +duperemove memtest86+ lm_sensors efitools quearcode qpdf kdenlive stress` + +## AMD + +``` +sudo dnf install rocminfo rocm-smi +sudo usermod -a -G render,video $(whoami) +```` +Then relog. ## Flathub apps @@ -45,7 +54,7 @@ can clear the app data. - Resources - `flatpak install flathub net.nokyan.Resources` - Use Wayland and disable X11 and its fallback - - Remove `host:ro` (sus) + - Remove `filesystem=host` (sus) - Video Trimmer - `flatpak install flathub org.gnome.gitlab.YaLTeR.VideoTrimmer` - Use Wayland and disable X11 and its fallback @@ -53,20 +62,44 @@ can clear the app data. - `flatpak install flathub com.usebottles.bottles` - Signal - `flatpak install flathub org.signal.Signal` - - Use Wayland: `SIGNAL_USE_WAYLAND=1` and disable X11 permissions. + - Use Wayland: `SIGNAL_USE_WAYLAND=1` and disable X11 and its fallback. + - Disable `filesystem=host`. Not sure why it would ever be a good idea. + [PR that enabled this by default + ](https://github.com/flathub/org.signal.Signal/pull/766) mentioned that + "Electron broke portals" and some default settings "will never satisfy + everyone", but that does not convince me. - Disable `org.freedesktop.login1`. Not sure why it's needed. If you know why, please let me know! + - Turn on notifications +- Speech Note + - `flatpak install net.mkiol.SpeechNote` + - `flatpak install net.mkiol.SpeechNote.Addon.amd` + - Disable X11 and fallback + - Remove: + - `xdg-documents` + - `xdg-videos` + - `xdg-music` + - `xdg-desktop` + - `xdg-download` - Cameractrls - `flatpak install flathub hu.irl.cameractrls` - Disable X11 and fallback - Denaro - `flatpak install flathub org.nickvision.money` - Disable X11 and fallback +- Ungoogled Chromium + - `flatpak install flathub io.github.ungoogled_software.ungoogled_chromium` + - Disable smart cards, printing system, all user files + - Enable GPU acceleration + - Remove Other files: `/run/.heim_org.h5l.kcm-socket` - Minecraft (Prism Launcher) - `flatpak install flathub org.prismlauncher.PrismLauncher` - Remove `xdg-download:ro` - Remove `~/.ftba:ro` - Remove `xdg-run/app/com.discordapp.Discord:create` + - Remove `/sys/kernel/mm/transparent_hugepage:ro` + - Remove `/sys/kernel/mm/hugepages:ro` + - Remove `xdg-config/kdeglobals:ro` - Steam - `flatpak install flathub com.valvesoftware.Steam` - Remove `xdg-run/app/com.discordapp.Discord:create` @@ -84,16 +117,24 @@ can clear the app data. - Discord - `flatpak install flathub com.discordapp.Discord` - Remove `xdg-pictures:ro`, `xdg-videos:ro` + - Allow background and notifications - Zoom - `flatpak install flathub us.zoom.Zoom` - WeChat - `flatpak install flathub com.tencent.WeChat` - Remove "Owns: `org.kde.*`" + - Remove `xdg-download:ro`; why do you need to read it? Isn't write what + you are after? ## SSH -In `Settings` -> `Sharing`: turn on `Remote Login` and edit -`/etc/ssh/sshd_config` according to `system/sshd/sshd_config-rhel`. +In `System` -> `Secure Shell`: turn on `Secure Shell` and edit +`/etc/ssh/sshd_config` according to `system/sshd/sshd_config-rhel`, or if you +are lazy: +``` +sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak +sudo cp ../system/sshd/sshd_config-rhel /etc/ssh/sshd_config +``` `sudoedit /etc/ssh/sshd_config.d/00-no-gss.conf` and write `GSSAPIAuthentication no` to override `/etc/ssh/sshd_config.d/50-redhat.conf`, @@ -107,7 +148,17 @@ sudo usermod -aG ssh-users $(whoami) ``` Finally, log out then log in again for the `usermod` to take effect. -If you see a permission denied from sshd in your logs, use +If you have just came from a non-SELinux distro (say the Debian family) and see +a permission denied message from `sshd` in your logs, use `restorecon -RFv ~/.ssh` to please SELinux. (Don't forget to install Mosh!) + +## Framework 16 + +Put the following into `/etc/udev/rules.d/50-framework-inputmodule.rules`: +``` +# Framework Laptop 16 - LED Matrix +SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE="0660", TAG+="uaccess" +``` +Then run `sudo udevadm control --reload && sudo udevadm trigger` diff --git a/setup/fedora-user-setup.md b/setup/fedora-user-setup.md index d88a775..eb49318 100644 --- a/setup/fedora-user-setup.md +++ b/setup/fedora-user-setup.md @@ -3,10 +3,11 @@ Now that you have setup your new system, time to configure quality-of-life user settings! -_Note: this document details the user level setup only. This means settings -that you may make without super user permission and are remembered in the home +_Note: This document details the user level setup only. This means settings +that you may make without superuser permission and are remembered in the home directory. For system level setup, see -[Fedora 39 System Setup](fedora-system-setup.md)._ +[Fedora 39 System Setup](fedora-system-setup.md). This is originally written +for Fedora 39 and updated to Fedora 40._ ## Default apps @@ -81,7 +82,7 @@ Reset SELinux labels: - Xournal++: turn on dark mode - OBS: 2560x1440, [mkv](https://en.wikipedia.org/wiki/Comparison_of_video_container_formats), - VAAPI AV1 (CQ 28), opus, output to `~/Videos/OBS/` + VAAPI AV1 (CQ 20), opus, output to `~/Videos/OBS/` - Install [per application audio capture](https://github.com/dimtpap/obs-pipewire-audio-capture/releases/tag/1.1.4). To install the plugin: open OBS folder from its menu, decompress the zip and remove the outer folder and put in the `plugins` folder, creating it if it @@ -91,3 +92,8 @@ Reset SELinux labels: [obs CLI for obs-websocket v5](https://github.com/grigio/obs-cmd) to emulate global shortcuts on Wayland - Enable replay buffer of 60 seconds and 1000 MB + +## Tricks + +Over amplification is nowhere to be found on recent GNOME Tweaks: +`gsettings set org.gnome.desktop.sound allow-volume-above-100-percent 'true'` diff --git a/system/mac-fnmode/fnmode-persistent-fedora b/system/mac-fnmode/fnmode-persistent-fedora new file mode 100755 index 0000000..f5b2589 --- /dev/null +++ b/system/mac-fnmode/fnmode-persistent-fedora @@ -0,0 +1,2 @@ +#!/bin/sh +echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf