[macos] Fix wallpaper switcher

This commit is contained in:
2026-01-08 22:51:28 +00:00
parent cae646a5f1
commit 045f65f27c

View File

@@ -106,7 +106,7 @@ function set_wallpaper() {
if [[ $(uname) == 'Darwin' ]]; then
# Set the wallpaper using AppleScript
osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$wallpaper_path\""
osascript -e "tell application \"System Events\" to set picture of every desktop to POSIX file \"$wallpaper_path\""
if [ $? -eq 0 ]; then
echo "Wallpaper set successfully: $wallpaper_path"