Add wallpaper rotation (4 wallpapers), fuzzel launcher, fix SSH/laptop.nix syntax
This commit is contained in:
parent
125edddec7
commit
cbd86ec79e
8 changed files with 33 additions and 3 deletions
|
|
@ -233,4 +233,8 @@
|
||||||
[urgency_normal] background = "#1e1e2e"; foreground = "#cdd6f4"; timeout = 5
|
[urgency_normal] background = "#1e1e2e"; foreground = "#cdd6f4"; timeout = 5
|
||||||
[urgency_critical] background = "#f38ba8"; foreground = "#1e1e2e"; timeout = 0
|
[urgency_critical] background = "#f38ba8"; foreground = "#1e1e2e"; timeout = 0
|
||||||
'';
|
'';
|
||||||
|
# === Wallpaper rotation ===
|
||||||
|
home.file.".local/bin/wallpaper-rotate" = {
|
||||||
|
source = ./wallpaper-rotate.sh;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ exec-once = dunst
|
||||||
exec-once = wl-paste --type text --watch cliphist store
|
exec-once = wl-paste --type text --watch cliphist store
|
||||||
exec-once = wl-paste --type image --watch cliphist store
|
exec-once = wl-paste --type image --watch cliphist store
|
||||||
exec-once = hypridle
|
exec-once = hypridle
|
||||||
|
exec-once = awww
|
||||||
|
exec-once = sleep 1 && ~/.local/bin/wallpaper-rotate
|
||||||
|
|
||||||
input {
|
input {
|
||||||
kb_layout = us
|
kb_layout = us
|
||||||
|
|
|
||||||
23
home/wallpaper-rotate.sh
Normal file
23
home/wallpaper-rotate.sh
Normal 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"
|
||||||
|
|
@ -189,12 +189,13 @@
|
||||||
|
|
||||||
# === Boot ===
|
# === Boot ===
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
# === SSH Server ===
|
# === SSH Server ===
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
||||||
BIN
wallpapers/center-cross.png
Normal file
BIN
wallpapers/center-cross.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
BIN
wallpapers/great-commission.png
Normal file
BIN
wallpapers/great-commission.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
BIN
wallpapers/offset-cross.png
Normal file
BIN
wallpapers/offset-cross.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
BIN
wallpapers/walk-with-god.png
Normal file
BIN
wallpapers/walk-with-god.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
Loading…
Add table
Add a link
Reference in a new issue