dotfiles/packages/scripts/select-wallpapers/default.nix
2025-11-03 10:42:58 +01:00

18 lines
488 B
Nix

{pkgs, ...}:
pkgs.writeTextFile rec {
name = "select-wallpapers";
destination = "/bin/${name}";
executable = true;
text = ''
#!/usr/bin/env nu
let wallpaper_dir = "/home/christopher/Wallpapers"
let landscape = (ls $"($wallpaper_dir)/Landscape" | shuffle | get name | first)
let portrait = (ls $"($wallpaper_dir)/Portrait" | shuffle | get name | first)
hyprctl hyprpaper reload $"DP-3,($landscape)"
hyprctl hyprpaper reload $"DP-1,($portrait)"
'';
}