summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-06-21 22:42:17 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-06-21 22:42:17 -0400
commit1d64a259eb2f377b7b7dc36263eaf33d4a7cf28c (patch)
tree81f5a2ac047f1ca693012162dd723dfc88edcc94 /modules
parent8f0d8e6dfe4632c461658a7db8f0eeb5261d62df (diff)
Changed wallpaper to change via helper app, initial settings for window
management
Diffstat (limited to 'modules')
-rw-r--r--modules/darwin/random-wallpaper.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/darwin/random-wallpaper.nix b/modules/darwin/random-wallpaper.nix
index 6b17c0f..75248b7 100644
--- a/modules/darwin/random-wallpaper.nix
+++ b/modules/darwin/random-wallpaper.nix
@@ -3,14 +3,15 @@ let
3 cfg = config.local.randomWallpaper; 3 cfg = config.local.randomWallpaper;
4 script = pkgs.writeShellApplication { 4 script = pkgs.writeShellApplication {
5 name = "set-random-wallpaper"; 5 name = "set-random-wallpaper";
6 runtimeInputs = [ pkgs.coreutils pkgs.findutils ]; 6 runtimeInputs = [ pkgs.coreutils pkgs.findutils pkgs.desktoppr];
7 text = '' 7 text = ''
8 set -euo pipefail 8 set -euo pipefail
9 img=$(find "${cfg.directory}" \ 9 img=$(find "${cfg.directory}" \
10 -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) \ 10 -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) \
11 | shuf -n1) 11 | shuf -n1)
12 [ -n "$img" ] || exit 0 12 [ -n "$img" ] || exit 0
13 /usr/bin/osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"$img\"" 13 #/usr/bin/osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"$img\""
14 desktoppr "$img"
14 ''; 15 '';
15 }; 16 };
16in 17in