i use arch btw
1# dotfiles
2
3My dotfiles managed using [GNU Stow](https://www.gnu.org/software/stow).
4
5## Personal installation notes
6
7#### Things that I might want to backup manually
8
9- `~/.local/share/fish/fish_history`
10- uBlock Origin filters & settings
11- Twitch FFZ, Previews, 7TV settings
12- ViolentMonkey userscripts & options
13- YouTube Enhancer & SponsorBlock config
14- Tabs and windows using Session Buddy
15- Remote Torrent Adder config
16- AniList Automail userscript config
17- VueTorrent settings
18- Redirector entries
19- Flatpak apps (`~/.var/app/` or `flatpak list --columns=application --app`)
20- gpg keys (`~/.gnupg/`)
21
22
23`// TODO: automate everything below`
24
25#### Clone dotfiles
26```shell
27git clone git@github.com:brw/dotfiles.git
28```
29
30#### Disable Intel pstate driver
31Add `intel_pstate=disable` to the options in `/boot/entries/linux.conf`
32
33Or `intel_pstate=active`, if using [throttled](https://github.com/erpalma/throttled):
34
35#### Copy system files
36```shell
37sudo cp -i sysctl/etc/sysctld.d/* /etc/sysctl.d/
38sudo cp -i zram/etc/systemd/zram-generator.conf /etc/systemd/
39sudo cp -i etc/udev/rules.d/10-trim.rules /etc/udev/rules.d/
40sudo cp -i throttled/etc/throttled.conf /etc/throttled.conf
41```
42
43#### Enable throttled
44```shell
45sudo systemctl enable --now throttled
46```
47
48#### Install yay
49```shell
50git clone https://aur.archlinux.org/yay.git
51cd yay
52makepkg -si
53yay -Y --gendb
54```
55
56#### Import tor gpg key
57```shell
58gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
59```
60
61#### Install packages
62```shell
63yay -Syu --needed $(cat arch-{shell,desktop}-packages)
64```
65
66#### Install dotfiles
67```
68rm -rf ~/.config/fish
69stow -d dotfiles bin cpupower direnv fish git gtk neofetch nvim ripgrep mise starship stow wayland paru ghostty jj
70```
71
72#### Use systemd-resolved
73```shell
74sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
75sudo systemctl enable --now systemd-resolved
76```
77
78#### Enable pkgfile daemon and pacman files db refresh timer
79```shell
80sudo systemctl enable --now pkgfiled pacman-filesdb-refresh.timer
81```
82
83#### Enable timers
84```shell
85sudo systemctl enable --now yaycache.timer paccache.timer plocate-updatedb.timer
86```
87
88#### Enable printer service
89```shell
90sudo systemctl enable --now cups
91```
92
93#### Enable systemd-boot update service
94```shell
95sudo systemctl enable systemd-boot-update
96```
97
98#### Enable en_NL locale
99```shell
100sudo sed -i '/^#en_NL.UTF-8 UTF-8/s/^#//' /etc/locale.gen
101sudo locale-gen
102```
103
104#### Enable kernel-modules-hook linux-modules-cleanup service
105```shell
106sudo systemctl enable --now linux-modules-cleanup
107```
108
109#### Fix fish universal variables in Gnome Wayland session
110Modify `/usr/bin/gnome-session`, changing (hardcoding) `$SHELL` to `sh` on line 10 ([temporary fix](https://github.com/fish-shell/fish-shell/issues/7995), probably bad practice but /shrug, universal variables are sort of maybe [being removed](https://github.com/fish-shell/fish-shell/issues/7379) in the near future anyway, at which point I'll change this)
111
112
113#### Fix scaling issues on Gnome Wayland and bluriness with Xwayland
114```shell
115org.gnome.mutter experimental-features ['scale-monitor-framebuffer', 'xwayland-native-scaling']
116```
117
118#### Unbind XF86Tools (F13) on Gnome
119For some reason the button I have bound to F13 on my mouse opens the Gnome control center/settings by default, with no way to change it outside of dconf/gsettings. quite annoying
120
121```shell
122gsettings set org.gnome.settings-daemon.plugins.media-keys control-center-static "['']"
123```
124
125#### Enable Gnome Keyring SSH Agent
126```shell
127systemctl --user enable --now gcr-ssh-agent
128ssh-add
129````
130
131#### Set up keylightd
132```
133sudo usermod -aG keylightd bas
134sudo systemctl enable --now keylightd
135```
136
137#### Get latest plex-rich-presence
138```shell
139curl -s https://api.github.com/repos/Arno500/plex-richpresence/releases/latest \
140 | jq -r '.assets[] | select(.name | contains("linux_amd64")).browser_download_url' \
141 | wget -q -P $HOME -i - \
142 && chmod +x $HOME/plex-rich-presence_linux_amd64-*
143```
144
145#### Install systemd services
146```shell
147cp -i systemd/.config/systemd/user/plex-rich-presence.service ~/.config/systemd/user/
148systemctl --user enable --now plex-rich-presence
149#sudo cp -i etc/systemd/system/reload-cpu-modules.service /etc/systemd/system/
150#sudo systemctl enable --now reload-cpu-modules
151#cp -i systemd/.config/systemd/user/imwheel.service ~/.config/systemd/user/
152#systemctl --user enable --now imwheel
153```