Arch
Set up swapfile
- Make the swapfile
sudo mkswap -U clear --size 8G --file /swapfile
- Turn it on
sudo swapon /swapfile
- Open:
/etc/fstab
- Add to the end:
/swapfile none swap defaults 0 0
Plasma Login Manager instead of SDDM
- Install Plasma Login Manager
sudo pacman -S plasma-login-manager
- Disable SDDM and enable Plasma Login Manager
sudo systemctl disable sddm
sudo systemctl enable --force plasmalogin.service
- List and remove SDDM packages
pacman -Qq | grep sddm
sudo pacman -Rns sddm sddm-kcm
Use all cores for package building and compression
- Open
/etc/makepkg.conf
- Uncomment and set
MAKEFLAGS=to$(nproc), it automatically detects your total CPU threads.
MAKEFLAGS="-j$(nproc)"
- Make file compressions multi-threaded too, comment out the default ones to keep them
COMPRESSXZ=(xz -c -T0 -z -)
COMPRESSZST=(zstd -c -T0 --auto-threads=logical -)
COMPRESSLZ4=(lz4 -q -T0)
the rest of the compressors can't be parallelized
Plasma
https://store.kde.org/p/1561335/ - willow dark decorations
https://store.kde.org/p/2139337 - split clock for vertical panels
https://github.com/matinlotfali/KDE-Rounded-Corners - rounded corners
https://github.com/vinceliuice/Tela-icon-theme - tela icons
https://github.com/vinceliuice/Qogir-icon-theme/tree/master/src/cursors/dist - qogir cursors
https://github.com/guiodic/material-decoration - [upstream implementation pending](https://invent.kde.org/plasma/breeze/-/merge_requests/529) - locally integrated menus
Freetube PiP
Add a window rule for an open PiP window
- Window class: unimportant
- Match whole class: no
- Window types: all selected
- Windows title: exact match,
Picture in picture - Keep above other windows: force, yes
With 0.24, the PiP broke, since on wayland the protocol for it is still in experimental.
fix: FreeTubeApp/FreeTube#8922 (comment)
Switch between audio outputs with a keyboard shortcut
made with claude 4.6, then cleaned up
my file as reference: https://github.com/Kingproone/dotfiles/blob/main/home/%24USER/.local/bin/switch-audio.sh
Before writing any script, you need to know which problem you're solving, because the solution differs:
Separate sinks: your system exposes multiple independent audio devices (e.g., built-in speakers, a USB DAC, a Bluetooth headset, an HDMI output). Each is a distinct "sink" in PipeWire/PulseAudio.
Ports on one sink: your system has a single sound card that exposes multiple outputs as ports (e.g., "Analog Headphones" and "Analog Line Out" both live under one ALSA sink).
Run this to see what you have:
pactl list sinks
Look at the Name: fields and the Ports: sections. If you have one sink with multiple ports listed under it, you need the port-switching approach. If you have multiple sinks, you need the sink-switching approach.
For sink switching:
pactl list short sinks
Note the full sink name from the second column, e.g. alsa_output.pci-0000_00_1f.3.analog-stereo.
For port switching:
pactl list sinks | grep -E 'Name:|port'
Note both the sink name and the port identifiers, e.g. analog-output-speaker, analog-output-headphones.
Create ~/.local/bin/switch-audio.sh, ~/.local/bin/ is the standard location for user-installed executables that don't require root.
#!/bin/bash
SINK1="alsa_output.pci-0000_00_1f.3.analog-stereo"
SINK2="alsa_output.pci-0000_00_1f.3.analog-headphones"
CURRENT=$(pactl get-default-sink)
if [ "$CURRENT" = "$SINK1" ]; then
TARGET="$SINK2"
LABEL="Headphones"
else
TARGET="$SINK1"
LABEL="Speakers"
fi
pactl set-sink-mute "$CURRENT" 1
pactl set-default-sink "$TARGET"
pactl list short sink-inputs | awk '{print $1}' | \
xargs -I{} pactl move-sink-input {} "$TARGET"
sleep 0.1
pactl set-sink-mute "$TARGET" 0
notify-send "Audio output" "$LABEL" -t 1000
The
move-sink-inputblock is critical. Without it, apps already playing audio will stay on the old sink and continue outputting there until they're restarted.
#!/bin/bash
SINKS=(
"alsa_output.pci-0000_00_1f.3.analog-stereo"
"alsa_output.pci-0000_00_1f.3.analog-headphones"
"bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink"
)
LABELS=("Speakers" "Headphones" "Bluetooth")
CURRENT=$(pactl get-default-sink)
NEXT_INDEX=0
for i in "${!SINKS[@]}"; do
if [ "${SINKS[$i]}" = "$CURRENT" ]; then
NEXT_INDEX=$(( (i + 1) % ${#SINKS[@]} ))
break
fi
done
TARGET="${SINKS[$NEXT_INDEX]}"
LABEL="${LABELS[$NEXT_INDEX]}"
pactl set-sink-mute "$CURRENT" 1
pactl set-default-sink "$TARGET"
pactl list short sink-inputs | awk '{print $1}' | \
xargs -I{} pactl move-sink-input {} "$TARGET"
sleep 0.1
pactl set-sink-mute "$TARGET" 0
notify-send "Audio output" "$LABEL" -t 1000
#!/bin/bash
SINK="alsa_output.pci-0000_00_1f.3.analog-stereo"
PORT1="analog-output-speaker"
PORT2="analog-output-headphones"
CURRENT_PORT=$(pactl list sinks | awk -v sink="$SINK" '
/Name: / { found = ($2 == sink) }
found && /Active Port/ { print $3; exit }
')
if [ "$CURRENT_PORT" = "$PORT1" ]; then
TARGET_PORT="$PORT2"
LABEL="Headphones"
else
TARGET_PORT="$PORT1"
LABEL="Speakers"
fi
pactl set-sink-mute "$SINK" 1
pactl set-sink-port "$SINK" "$TARGET_PORT"
sleep 0.1
pactl set-sink-mute "$SINK" 0
notify-send "Audio output" "$LABEL" -t 1000
Note: port switching affects output routing at the hardware level, so there are no sink-inputs to move here — all streams on that sink follow the port change automatically.
All the scripts have a sleep timer, this is because audio levels will be applied after switching, resulting in a pop noise, 0.1 worked for me, play around with it
chmod +x ~/.local/bin/switch-audio.sh
./switch-audio.sh
Open something that's playing audio before testing, so you can confirm streams follow the switch.
System Settings → Keyboard → Shortcuts → Add New → Command or Script...
- Set the Command to the full path:
/home/yourusername/.local/bin/switch-audio.sh(the shortcut daemon may not expand tilde correctly.) - Click
+ Add...and press your desired key combination (e.g. Meta+A) - Click
Apply
Script works in terminal but not from shortcut: use full paths to any binaries if needed (/usr/bin/pactl).
notify-send shows nothing: on some setups notify-send needs DBUS_SESSION_BUS_ADDRESS set. Add this near the top of your script:
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus"
Bluetooth sink not appearing: Bluetooth sinks only exist in PipeWire/PulseAudio while the device is connected. The cycle script above will skip gracefully if a sink isn't present only if you add a connectivity check; otherwise it will fall through to index 0. If you rely on Bluetooth in the rotation, add a check with pactl list short sinks | grep -q "$TARGET" before setting it.
Fastfetch
https://github.com/fastfetch-cli/fastfetch/wiki
https://github.com/fastfetch-cli/fastfetch/tree/dev/presets
https://github.com/ChrisTitusTech/mybash/blob/main/config.jsonc
fastfetch-cli/fastfetch#1040 (comment)
https://www.asciiart.eu/
fastfetch-cli/fastfetch#1847
Bash
A command listed in .bashrc will run at terminal start.
https://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
https://stackoverflow.com/questions/2518127/how-to-reload-bashrc-settings-without-logging-out-and-back-in-again
https://unix.stackexchange.com/questions/100959/how-can-i-change-my-bash-prompt-to-show-my-working-directory
https://askubuntu.com/questions/1792/how-can-i-suspend-hibernate-from-command-line
https://superuser.com/questions/402246/bash-can-i-set-ctrl-backspace-to-delete-the-word-backward
https://github.com/ChrisTitusTech/mybash/blob/main/.bashrc
https://stackoverflow.com/questions/71459823/how-to-change-the-terminal-title-to-currently-running-process
https://misc.flogisoft.com/bash/tip_colors_and_formatting
https://medium.com/@adamtowers/how-to-customize-your-terminal-and-bash-profile-from-scratch-9ab079256380
Grub
Regenerate grub.cfg with:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Generate font file:
grub-mkfont --output=outfile.pf2 --size=16 infile.ttf
https://www.artstation.com/artwork/oOYllO - background
https://www.gnome-look.org/p/1009236 - icons (shutdown and restart have been made a bit bigger), and the bottom infobar
https://wiki.archlinux.org/title/GRUB#Dual-booting
https://www.gnu.org/software/grub/manual/grub/html_node/Theme-file-format.html
https://daulton.ca/2018/08/reboot-and-shutdown-options-grub/
https://askubuntu.com/questions/1513639/how-to-load-custom-fonts-in-a-grub-theme
os-prober and grub customizer died for me
No longer used
https://github.com/TwiggieSmallz/Default-Alacritty-TOML-Config/blob/main/alacritty.toml
alacritty/alacritty#8494 - scrollbar pr, probably not happening, why I use Konsole