Add script to manually set wallpapers

This commit is contained in:
Danielle McLean 2025-02-11 16:14:21 +11:00
parent d99acbcbea
commit f4a8467915
Signed by: 00dani
GPG key ID: 6854781A0488421C

6
dot-local/bin/set-wallpaper Executable file
View file

@ -0,0 +1,6 @@
#!/bin/zsh
WALLPAPER_PATH=${1:a}
WALLPAPER_URI=file://$WALLPAPER_PATH
WALLPAPER_KEY=AllSpacesAndDisplays:Desktop:Content:Choices:0:Files:0:relative
/usr/libexec/PlistBuddy -c "set $WALLPAPER_KEY $WALLPAPER_URI" ~/Library/Application\ Support/com.apple.wallpaper/Store/Index.plist && killall WallpaperAgent