1/7/2024 0 Comments Outset macos![]() Returns: Int result code, based on PyObjC enums. ![]() """Present the Alert, giving up after configured time. # pylint: enable=attribute-defined-outside-init timerWithTimeInterval_target_selector_userInfo_repeats_( # pylint: disable=attribute-defined-outside-init # Cocoa objects must use class func alloc().init(), so pylint """Configure alert to give up after time seconds.""" """Set the sound to play when alert is presented. setIcon_( icon) # pylint: disable=no-member Path: String path to a valid NSImage filetype (png) """Convenience method for adding an icon. """Add an instance variable for our timer."""ĭef setIconWithContentsOfFile_( self, path): """Subclasses NSAlert to include a timeout."""ĭef init( self): # pylint: disable=super-on-old-class # Methods are named according to PyObjC/Cocoa style. If not present, the Python rocket is used NSRunAbortedResponse, NSAlertFirstButtonReturn)įrom LaunchServices import LSSetDefaultHandlerForURLSchemeįrom SystemConfiguration import SCDynamicStoreCop圜onsoleUser Software Center, using outset's on-demand feature to run as the currentĬonsole user (as it would otherwise run as root and not work).įrom AppKit import ( NSImage, NSAlert, NSTimer, NSRunLoop, NSApplication, This was written to be part of an OnDemand item in Munki's Managed This uses code from my auto_logout project for the applescripting and Sets the default mail reader to Apple Mail (because we configure ourĬlients to use Outlook) using the LaunchServices framework, and thenĭisplays a dialog instructing user to close open applications that mayīlock logout from occuring, rather than execute a Volcanic Instant Death Help user set default mail client despite OS X bug. # You should have received a copy of the GNU General Public License # GNU General Public License for more details. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # but WITHOUT ANY WARRANTY without even the implied warranty of # This program is distributed in the hope that it will be useful, # the Free Software Foundation, either version 3 of the License, or # it under the terms of the GNU General Public License as published by # This program is free software: you can redistribute it and/or modify To restore Apple Mail as the default mail reader, run this item, and then following the prompting instructions, quit all of your open applications prior to continuing. L_usr_local_outset: mkdir -p chown -R root:wheel chmod -R 755 $/usr/local/outset/on-demandĭue to a bug in OS X, the default mail handler cannot be set by the user after it has been set once without programmatic intervention. # Put this at /usr/local/share/luggage/luggage.local to reap the rewards.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |