This repository has no description
0

Configure Feed

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

desktops/sway: drop the mpvpaper live wallpaper

mpvpaper rendered a looping video on every output, which makes every frame
full-screen motion. On the sunshine-streamed tablet screen that meant a
constantly saturated encoder and an unusable stream (97% of frames dropped
at 5 Mbps), and on the real outputs it is pointless power draw.

noctalia owns the desktop background again (wallpaper.enabled = true); pick
the image in its wallpaper panel. ~/wallpaper is no longer seeded, but
lockscreen still uses whatever is in it.

+8 -97
+8 -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 + # noctalia owns the desktop background. It draws a static image (or 19 + # a solid colour), unlike the mpvpaper live video wallpaper it 20 + # replaced: a looping video on every output means every frame is 21 + # full-screen motion, which is unusable for the sunshine-streamed 22 + # tablet screen (2configs/tablet-screen.nix) and pointless power 23 + # draw on the real ones. Pick the image in noctalia's wallpaper 24 + # panel; only `enabled` is pinned here. 25 + wallpaper.enabled = true; 22 26 # DDC/CI control for external monitors via ddcutil. Inert on 23 27 # machines without DDC/CI-capable displays (detection finds 24 28 # nothing, internal backlight path is used as before).
-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 msg-level=all=no" \ 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"
-1
2configs/desktops/sway/default.nix
··· 217 217 imports = [ 218 218 ../lib/wayland.nix 219 219 ./noctalia.nix 220 - ./wallpaper.nix 221 220 ]; 222 221 programs.sway = { 223 222 enable = true;
-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.