Skip to content

Instantly share code, notes, and snippets.

@jwpage
Created August 26, 2010 00:44
Show Gist options
  • Save jwpage/550577 to your computer and use it in GitHub Desktop.
Save jwpage/550577 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Simple script to toggle the "When switching to an application, switch to a
# space with open windows for the application" option in Settings > Expose &
# Spaces > Spaces.
#
# Handy for times when you don't want to be easily distracted by things in
# another space.
swoosh=`defaults read com.apple.dock workspaces-auto-swoosh`
if [[ $swoosh == "1" ]]
then defaults write com.apple.dock workspaces-auto-swoosh -bool NO
else defaults write com.apple.dock workspaces-auto-swoosh -bool YES
fi
killall Dock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment