This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

wallpaper: live desktop + lockscreen from ~/wallpaper

mpvpaper renders a random video/image from ~/wallpaper on the background
layer, rotated daily; noctalia's own wallpaper is disabled to let it show
through. lockscreen picks from the same folder. Seeds a moewalls pixel-art
sunset starter. Drops the unused feh fetchWallpaper on ignavia.

+115 -8
-1
machines/ignavia/config.nix
··· 23 23 # ../../2configs/games.nix 24 24 ../../2configs/steam.nix 25 25 # ../../2configs/wine.nix 26 - ../../2configs/fetchWallpaper.nix 27 26 ../../2configs/yellow-mounts/samba.nix 28 27 ../../2configs/pass.nix 29 28 ../../2configs/mail.nix
+15 -4
tools/lockscreen/flake-module.nix
··· 13 13 pkgs.mpvpaper 14 14 ]; 15 15 text = '' 16 - VIDEO=$(find "$HOME"/lockscreens/*.{mp4,webm} | shuf -n 1) 17 - DURATION=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$VIDEO" 2>/dev/null | cut -d. -f1) 18 - START=$((RANDOM % ''${DURATION:-300})) 19 - exec swaylock-plugin --command "mpvpaper -o \"no-audio loop start=$START\" '*' \"$VIDEO\"" "$@" 16 + # Random lock background (video or image) from the shared 17 + # ~/wallpaper folder. Falls back to a plain locker when the 18 + # folder is empty, so the screen still locks. 19 + FILE=$(find "$HOME/wallpaper" -type f \( \ 20 + -iname '*.mp4' -o -iname '*.webm' -o -iname '*.mkv' -o -iname '*.mov' -o \ 21 + -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.webp' \ 22 + \) 2>/dev/null | shuf -n 1 || true) 23 + if [ -z "$FILE" ]; then 24 + exec swaylock-plugin "$@" 25 + fi 26 + DUR=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$FILE" 2>/dev/null | cut -d. -f1) 27 + case "$DUR" in "" | *[!0-9]*) DUR=1 ;; esac 28 + if [ "$DUR" -lt 1 ]; then DUR=1; fi 29 + START=$((RANDOM % DUR)) 30 + exec swaylock-plugin --command "mpvpaper -o \"no-audio loop start=$START\" '*' \"$FILE\"" "$@" 20 31 ''; 21 32 }).overrideAttrs 22 33 { passthru.usage = builtins.readFile ./usage.kdl; };
+4
tools/noctalia-shell/flake-module.nix
··· 15 15 # Mirror noctalia's dark mode toggle to the system theme. 16 16 darkModeChange = ''if [ "$1" = "true" ]; then switch-theme dark; else switch-theme light; fi''; 17 17 }; 18 + # The live desktop wallpaper is rendered by mpvpaper on the 19 + # background layer (see 2configs/desktops/sway/wallpaper.nix), so 20 + # noctalia's own wallpaper is turned off to let it show through. 21 + wallpaper.enabled = false; 18 22 }; 19 23 20 24 settingsPatches = [
+33
tools/wallpaper/flake-module.nix
··· 1 + { 2 + perSystem = 3 + { pkgs, ... }: 4 + { 5 + packages.wallpaper = 6 + (pkgs.writeShellApplication { 7 + name = "wallpaper"; 8 + runtimeInputs = [ 9 + pkgs.coreutils 10 + pkgs.findutils 11 + pkgs.mpvpaper 12 + ]; 13 + text = '' 14 + # Pick a random wallpaper (video or image) from ~/wallpaper and 15 + # render it on every output via mpvpaper. Long-running: this 16 + # process *is* the wallpaper. `-p` auto-pauses playback while the 17 + # wallpaper is fully hidden to save power. 18 + FILE=$(find "$HOME/wallpaper" -type f \( \ 19 + -iname '*.mp4' -o -iname '*.webm' -o -iname '*.mkv' -o -iname '*.mov' -o \ 20 + -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.webp' \ 21 + \) 2>/dev/null | shuf -n 1) 22 + if [ -z "$FILE" ]; then 23 + echo "wallpaper: no wallpapers found in ~/wallpaper" >&2 24 + exit 0 25 + fi 26 + exec mpvpaper -p \ 27 + -o "no-audio loop-file=inf image-display-duration=inf hwdec=auto-safe" \ 28 + '*' "$FILE" 29 + ''; 30 + }).overrideAttrs 31 + { passthru.usage = builtins.readFile ./usage.kdl; }; 32 + }; 33 + }
+2
tools/wallpaper/usage.kdl
··· 1 + bin "wallpaper" 2 + about "Live desktop wallpaper: random video/image from ~/wallpaper via mpvpaper"
+4 -3
2configs/desktops/sway/default.nix
··· 53 53 imports = [ 54 54 ../lib/wayland.nix 55 55 ./noctalia.nix 56 + ./wallpaper.nix 56 57 ]; 57 58 programs.sway = { 58 59 enable = true; ··· 401 402 ) 402 403 } 403 404 404 - # screenlock (via noctalia's lock screen) 405 - bindsym $mod+F11 exec ${lib.getExe self.packages.${pkgs.system}.noctalia-shell} ipc call lockScreen lock 406 - bindsym $mod+l exec ${lib.getExe self.packages.${pkgs.system}.noctalia-shell} ipc call lockScreen lock 405 + # screenlock (random live video/image from ~/wallpaper via swaylock-plugin) 406 + bindsym $mod+F11 exec ${lib.getExe' pkgs.systemd "systemctl"} --user start lock.target 407 + bindsym $mod+l exec ${lib.getExe' pkgs.systemd "systemctl"} --user start lock.target 407 408 408 409 # kill window (xkill-like) 409 410 mode "kill" {
+57
2configs/desktops/sway/wallpaper.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + config, 5 + self, 6 + ... 7 + }: 8 + let 9 + inherit (config.users.users.mainUser) name home group; 10 + wallpaperDir = "${home}/wallpaper"; 11 + 12 + wallpaper = self.packages.${pkgs.system}.wallpaper; 13 + in 14 + { 15 + # Seed ~/wallpaper with the starter live wallpaper (pixel-art road/trees/ 16 + # sunset from moewalls, transcoded to 1080p30 without audio). `C` copies it 17 + # once when missing, so the user can freely add or delete wallpapers 18 + # afterwards without it reappearing. 19 + systemd.tmpfiles.rules = [ 20 + "d ${wallpaperDir} 0755 ${name} ${group} -" 21 + "C ${wallpaperDir}/road-trees-sunset-sky-pixel.mp4 0644 ${name} ${group} - ${./wallpapers/road-trees-sunset-sky-pixel.mp4}" 22 + ]; 23 + 24 + # Live wallpaper: mpvpaper renders a random file from ~/wallpaper on the 25 + # background layer. noctalia's own wallpaper is disabled (see the noctalia 26 + # wrapper) so this shows through. 27 + systemd.user.services.wallpaper = { 28 + description = "Live desktop wallpaper (mpvpaper)"; 29 + partOf = [ "sway-session.target" ]; 30 + wantedBy = [ "sway-session.target" ]; 31 + after = [ "sway-session.target" ]; 32 + serviceConfig = { 33 + Type = "simple"; 34 + ExecStart = lib.getExe wallpaper; 35 + Restart = "on-failure"; 36 + RestartSec = 2; 37 + }; 38 + }; 39 + 40 + # Rotate to a fresh random wallpaper once a day by restarting the service. 41 + systemd.user.services.wallpaper-rotate = { 42 + description = "Rotate the live desktop wallpaper"; 43 + serviceConfig = { 44 + Type = "oneshot"; 45 + ExecStart = "${lib.getExe' pkgs.systemd "systemctl"} --user restart wallpaper.service"; 46 + }; 47 + }; 48 + 49 + systemd.user.timers.wallpaper-rotate = { 50 + description = "Daily live wallpaper rotation"; 51 + wantedBy = [ "timers.target" ]; 52 + timerConfig = { 53 + OnCalendar = "daily"; 54 + Persistent = true; 55 + }; 56 + }; 57 + }
2configs/desktops/sway/wallpapers/road-trees-sunset-sky-pixel.mp4

This is a binary file and will not be displayed.