-
-
Save pa-0/53c6fb2c4c61336e40cbbcde03fe190e to your computer and use it in GitHub Desktop.
Disable those pesky hot corners when you don't want them and easily reenable them when you do!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- By Richard Kulesus, 2009. Released without license! | |
-- Use this for whatever! | |
-- I seriously despise code authors who copyright tiny bits of obvious code | |
-- like it's some great treasure. This is small and simple, and if it saves | |
-- the next guy some time and trouble coding applescript I'll feel good! | |
-- | |
-- Quickly change all the hot-corners to do what you want. | |
-- Particularly useful for presentations and full-screen games. | |
-- Customize the activity of each hot-corner with "all windows/application windows/dashboard/disable screen saver/none/show desktop/show spaces/sleep display/start screen saver" | |
-- The MODIFIERS are the keys which can be used to supplement hot-corner activation. | |
-- Here I've set them all to {}, which is none. Options are "command/control/none/option/shift" | |
-- Dashboard in a fullscreen application. | |
-- | |
-- Version 1.0 | |
-- - Initial release | |
-- | |
tell application "System Events" | |
activate | |
if UI elements enabled then | |
tell expose preferences | |
set properties of the top left screen corner to {activity:none, modifiers:{}} | |
set properties of the top right screen corner to {activity:none, modifiers:{}} | |
set properties of the bottom left screen corner to {activity:none, modifiers:{}} | |
set properties of the bottom right screen corner to {activity:none, modifiers:{}} | |
end tell | |
else | |
tell application "System Preferences" | |
activate | |
set current pane to pane "com.apple.preference.universalaccess" | |
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\"" | |
end tell | |
end if | |
end tell | |
tell application "System Preferences" to quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- By Richard Kulesus, 2009. Released without license! | |
-- Use this for whatever! | |
-- I seriously despise code authors who copyright tiny bits of obvious code | |
-- like it's some great treasure. This is small and simple, and if it saves | |
-- the next guy some time and trouble coding applescript I'll feel good! | |
-- | |
-- Quickly change all the hot-corners to do what you want. | |
-- Particularly useful for presentations and full-screen games. | |
-- Customize the activity of each hot-corner with "all windows/application windows/dashboard/disable screen saver/none/show desktop/show spaces/sleep display/start screen saver" | |
-- The MODIFIERS are the keys which can be used to supplement hot-corner activation. | |
-- Here I've set them all to {}, which is none. Options are "command/control/none/option/shift" | |
-- Dashboard in a fullscreen application. | |
-- | |
-- Version 1.0 | |
-- - Initial release | |
-- | |
tell application "System Events" | |
activate | |
if UI elements enabled then | |
tell expose preferences | |
set properties of the top left screen corner to {activity:all windows, modifiers:{}} | |
set properties of the top right screen corner to {activity:all windows, modifiers:{}} | |
set properties of the bottom left screen corner to {activity:show spaces, modifiers:{}} | |
set properties of the bottom right screen corner to {activity:show desktop, modifiers:{}} | |
end tell | |
else | |
tell application "System Preferences" | |
activate | |
set current pane to pane "com.apple.preference.universalaccess" | |
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\"" | |
end tell | |
end if | |
end tell | |
tell application "System Preferences" to quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment