Add wallpaper rotation (4 wallpapers), fuzzel launcher, fix SSH/laptop.nix syntax

This commit is contained in:
Scott Scoble 2026-05-16 23:49:24 -07:00
parent 125edddec7
commit cbd86ec79e
8 changed files with 33 additions and 3 deletions

View file

@ -233,4 +233,8 @@
[urgency_normal] background = "#1e1e2e"; foreground = "#cdd6f4"; timeout = 5
[urgency_critical] background = "#f38ba8"; foreground = "#1e1e2e"; timeout = 0
'';
# === Wallpaper rotation ===
home.file.".local/bin/wallpaper-rotate" = {
source = ./wallpaper-rotate.sh;
};
}

View file

@ -12,6 +12,8 @@ exec-once = dunst
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
exec-once = hypridle
exec-once = awww
exec-once = sleep 1 && ~/.local/bin/wallpaper-rotate
input {
kb_layout = us

23
home/wallpaper-rotate.sh Normal file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -o pipefail
# Wallpapers are in the laptop-config repo
WALLPAPER_DIR="$HOME/laptop-config/wallpapers"
CACHE_FILE="$HOME/.cache/current-wallpaper"
mapfile -t wallpapers < <(find "$WALLPAPER_DIR" -maxdepth 1 -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.gif" \) | sort)
count="${#wallpapers[@]}"
if [ "$count" -eq 0 ]; then
echo "No wallpapers found in $WALLPAPER_DIR"
exit 1
fi
current=$(cat "$CACHE_FILE" 2>/dev/null || echo "")
chosen="$current"
while [ "$chosen" = "$current" ] && [ "$count" -gt 1 ]; do
chosen="${wallpapers[$((RANDOM % count))]}"
done
echo "$chosen" > "$CACHE_FILE"
awww img "$chosen"

View file

@ -189,8 +189,6 @@
# === Boot ===
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}
# === SSH Server ===
services.openssh = {
@ -198,3 +196,6 @@
settings.PasswordAuthentication = false;
openFirewall = true;
};
boot.loader.efi.canTouchEfiVariables = true;
}

BIN
wallpapers/center-cross.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
wallpapers/offset-cross.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB