mirror of
https://github.com/nikdoof/dotfiles.git
synced 2026-01-30 02:48:15 +00:00
[macos] Fix wallpaper switcher
This commit is contained in:
@@ -106,7 +106,7 @@ function set_wallpaper() {
|
|||||||
|
|
||||||
if [[ $(uname) == 'Darwin' ]]; then
|
if [[ $(uname) == 'Darwin' ]]; then
|
||||||
# Set the wallpaper using AppleScript
|
# 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
|
if [ $? -eq 0 ]; then
|
||||||
echo "Wallpaper set successfully: $wallpaper_path"
|
echo "Wallpaper set successfully: $wallpaper_path"
|
||||||
|
|||||||
Reference in New Issue
Block a user