unixorn/tumult.plugin.zsh

View on GitHub
bin/change-wallpaper

Summary

Maintainability
Test Coverage
#!/bin/bash
#
# Force wallpaper to switch immediately

set -e

if [[ "$(uname -s)" != 'Darwin' ]]; then
  echo 'Sorry, this script only works on macOS'
  exit 1
fi

exec osascript <<EOF
tell application "System Events"
    tell current desktop
        set initInterval to get change interval
        set change interval to -1
        set change interval to initInterval
     end tell
end tell
EOF