.s/scripts/theme/hooks/background.sh

12 lines
330 B
Bash
Raw Normal View History

2024-05-26 16:23:12 -04:00
#!/bin/bash
NEW_THEME=$2
function wallpaper() {
2024-05-27 16:57:39 -04:00
/usr/libexec/PlistBuddy -c "set AllSpacesAndDisplays:Desktop:Content:Choices:0:Files:0:relative file:///$1" ~/Library/Application\ Support/com.apple.wallpaper/Store/Index.plist && \
killall WallpaperAgent
2024-05-26 16:23:12 -04:00
}
wp=$(find $HOME/Wallpapers/$NEW_THEME/* | shuf -n1)
wallpaper $wp