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
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...} | |
property processesToIgnore : {} | |
-- Get the size of the Display(s), only useful if there is one display | |
-- otherwise it will grab the total size of both displays | |
tell application "Finder" | |
set _b to bounds of window of desktop | |
set screen_width to item 3 of _b | |
set screen_height to item 4 of _b | |
end tell |
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
import plistlib | |
import CoreFoundation | |
from Foundation import NSDate, NSMutableArray, NSMutableDictionary | |
# read the current ManagedPlugInPolicies | |
policy = CoreFoundation.CFPreferencesCopyAppValue("ManagedPlugInPolicies", "com.apple.Safari") | |
if policy: | |
# policy is an immutable dict, so we have to make a mutable copy | |
my_policy = NSMutableDictionary.alloc().initWithDictionary_copyItems_(policy, True) |
NewerOlder