Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Toggle Spaces on and off via AppleScript System 10.5
I use a big external monitor at work, and carry my MacBook around. I've found that Spaces is not much needed when I have two monitors rather than one. However, bringing up Spaces System Preferences panel just to toggle Spaces on and off is a pain.

So I wrote a small AppleScript that toggels Spaces on and off: Or if you prefer, you can download Space Toggler (20KB), which is a little script application that includes Growl notification. (These scripts originally appeared in this entry in my blog.)
    •    
  • Currently 1.88 / 5
  You rated: 5 / 5 (8 votes cast)
 
[9,080 views]  

10.5: Toggle Spaces on and off via AppleScript | 8 comments | Create New Account
Click here to return to the '10.5: Toggle Spaces on and off via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Toggle Spaces on and off via AppleScript
Authored by: Steve28 on Aug 01, '08 08:36:29AM

I don't understand this. Why would you need to turn it off at all? Just don't use it when you don't need it.



[ Reply to This | # ]
10.5: Toggle Spaces on and off via AppleScript
Authored by: eagle on Aug 01, '08 02:01:42PM

If you have applications set to use specific workspaces, as I do and as I am sure the author does, then you have to turn Spaces off in order to see them all on the same space. Your suggestion doesn't work in that situation.



[ Reply to This | # ]
10.5: Toggle Spaces on and off via AppleScript
Authored by: Tim L on Aug 01, '08 11:54:01PM

Perhaps because if you've assigned spaces to a screen corner in Expose, it can be annoying if you accidentally move your cursor to that corner...?



[ Reply to This | # ]
10.5: Toggle Spaces on and off via AppleScript
Authored by: mark hunte on Aug 01, '08 09:35:11AM
You do not need to read and write to the Plist file.


tell application "System Events"
	tell expose preferences
		tell spaces preferences
			set spaceset to item 1 of (get properties as list)
			set spaces enabled to (not (spaceset as boolean))
			get properties
		end tell
	end tell
end tell

---
mh

[ Reply to This | # ]

10.5: Toggle Spaces on and off via AppleScript
Authored by: jhlee on Aug 01, '08 12:14:48PM

Thanks you so much. That's what i was looking for.



[ Reply to This | # ]
10.5: Toggle Spaces on and off via AppleScript
Authored by: jonn8n on Aug 01, '08 02:34:30PM
I posted a full AppleScript library for working with Spaces last year:

http://bbs.macscripter.net/viewtopic.php?id=23453

Jon

[ Reply to This | # ]
10.5: Toggle Spaces on and off via AppleScript
Authored by: jhlee on Aug 01, '08 03:14:07PM

Wow, this is great!! Now i believe that posting a lousy tip shamelessly is worthwhile for me, consider all these wonderful tips in return,which i wasn't able to find. Thanks



[ Reply to This | # ]
10.5: Toggle Spaces on and off via AppleScript
Authored by: captainulf on Aug 04, '08 12:29:25AM
Perhaps you could launch your script with Marco Polo [link:]http://www.symonds.id.au/marcopolo/ I havn't tried it but that would seem to automate the entire setup.

[ Reply to This | # ]