{ pkgs, ... }: let swwwMorning = "${pkgs.swww}/bin/swww img ${../../wallpapers/tropic_island_morning.jpg}"; swwwDay = "${pkgs.swww}/bin/swww img ${../../wallpapers/tropic_island_day.jpg}"; swwwEvening = "${pkgs.swww}/bin/swww img ${../../wallpapers/tropic_island_evening.jpg}"; swwwNight = "${pkgs.swww}/bin/swww img ${../../wallpapers/tropic_island_night.jpg}"; dynamicWallpaper = pkgs.writeShellScriptBin "dynamic-wallpaper" '' case $(date +%H) in 06 | 07 | 08) # Morning ${swwwMorning} ;; 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17) # Day ${swwwDay} ;; 18 | 19 | 20) # Evening ${swwwEvening} ;; 21 | 22 | 23 | 00 | 01 | 02 | 03 | 04 | 05) # Night ${swwwNight} ;; esac ''; in { home.packages = [ pkgs.swww dynamicWallpaper ]; }