Package: rumps
rumpsRidiculouslyUncomplicatedmacOSPythonStatusbar apps.importrumpsclassAwesomeStatusBarApp(rumps.App):@rumps.clicked("Preferences")defprefs(self,_):rumps.alert("jk! no preferences available!")@rumps.clicked("Silly button")defonoff(self,sender):sender.state=notsender.state@rumps.clicked("Say hi")defsayhi(self,_):rumps.notification("Awesome title","amazing subtitle","hi!!1")if__name__=="__main__":AwesomeStatusBarApp("Awesome App").run()How fun!?rumpscan greatly shorten the code required to generate a working app. NoPyObjCunderscore syntax required!Use caserumpsis for any console-based program that would benefit from a simple configuration toolbar or launch menu.Good for:Notification-center-based appControlling daemons / launching separate programsUpdating simple info from web APIs on a timerNot good for:Any app that is first and foremost a GUI applicationRequiredPyObjCPython 2.6+Mac OS X 10.6 was shipped with Python 2.6 as the default version and PyObjC has been included in the default Python
since Mac OS X 10.5. If you’re using Mac OS X 10.6+ and the default Python that came with it, thenrumpsshould be
good to go!Recommendedpy2appFor creating standalone apps, just make sure to includerumpsin thepackageslist. Most simple statusbar-based
apps are just “background” apps (no icon in the dock; inability to tab to the application) so it is likely that you
would want to set'LSUIElement'toTrue. A basicsetup.pywould look like,fromsetuptoolsimportsetupAPP=['example_class.py']DATA_FILES=[]OPTIONS={'argv_emulation':True,'plist':{'LSUIElement':True,},'packages':['rumps'],}setup(app=APP,data_files=DATA_FILES,options={'py2app':OPTIONS},setup_requires=['py2app'],)With this you can then create a standalone,pythonsetup.pypy2appInstallationUsing pip,pipinstallrumpsOr from source,pythonsetup.pyinstallBoth of which will requiresudoif installing in a system-wide location.Virtual EnvironmentsThere are issues with usingvirtualenvbecause of the way the Python
executable is copied. Althoughrumpsattempts to apply a fix (hack) during
the install process, it is not suggested to usevirtualenv.To ensure proper functionality, either usevenv(packaged with Python 3) or
create a standalone app usingpy2app.python3-mvenvenvDocumentationDocumentation is available athttp://rumps.readthedocs.orgLicense“Modified BSD License”. See LICENSE for details. Copyright Jared Suttles, 2020.Works Made With rumps20twenty20 - eohomegrownapps42-CanITakeCoffee - avalleteair-quality-app - grtfouAirplane - C-Codesallbar - raphaelhuefnerallofthelights - kenkeiterattendee-tool-mlh - BucknallaAuroratain - Matt-McConwayAutoSSP - viktyzAutoVPN - shadyabhiBackgroundsForReddit - karlaugstenbink - e40bitracker - JZChenBluetoothEvent - lostman-githubbreak-timer - jjmojojjmojobreaker - amloewibundle-checker - jeffgodwyllc1t1 - e9tCamAlert - MrBananaPantscamsketch - pdubroycasita - david-kuehnChargeMon - RhetTbullComicStreamer - bevillecommitwatch - chrisfosterelliComMute - cwverheycomputer-time - rbrichcrypto-ticker-macOS - mqulateencryptocoin-quotes - Sayan98cuco - jjuandacurrency-converter - ahmedelgoharydns.app - damlnDokky - rogierkndolar_bitcoin - celisduplicati - duplicatidysonMacOS - fhenwoodearth - nickrobsonForceNapClone - hroftgitfreelan-bar - privaceeg-assistant-mac - agucovagapa - ozlerhakanGitSyncApp - jachinGumpy - RobGrahamHabitus - kmundnicHalfCaff - dougnhappymac - laffraharmenubar - vekkt0rhatarake - kfdm-archiveHipStatus - jamfithp-lorem - jamesramptonhs100-status-bar - craig-davisiBatteryStats - saket13iBrew - Tristan79idiot - snareinterlocking - jrauchistat - Lingdu0keynote_snap - sasn0Keypad - jelmer04keyringo - tokenizecxkizkiz - TkTechkoinex-status-ticker - kirantambeleaguefriend - pandarisonLifxController - mitchmcdeelil_ip_toolbar - mchlrtkwskimac-shrew - mejmoMacFaceID - vkalia602majo-v - r4lvMBatteryApp - Elliot-PottsMcBing - bagabontMemcode - aroraenterprisememdam - joshalbrechtMenuBarGmail - rcmdnkMenuPing - Julien Bordetmidi2dmx - davidbistolasmonero-ticker - CisplatinMoodLight - kretashMoonTicker - skxumusicbar - russelgnarcissist - helmholtzNoise-Line - Dnnchanowplaying_statusbar - MataiulSobmenka - vlakinOnAir - henrik242org-clock-dashboard - sridosx-bamboo-plan-status - spalterosx-myair - CameronExPennAppsX - yousufmsolimanphd - ChrisCumminspokemon-go-status - pboardmanpolly - interrogatorpompy - camilopayanproject_screen_to_lifx - emiragaPSPEWC-mac - jacquesCedricpy-Timey - asakasinskypymodoro - volflowpySplash - Egregorsquick-grayscale - shubhamjainquiet - hiroshiRadio-Crowd - EliMendelsonRadioBar - wass3rRadioBar (fork) - mdbraberrescuetime_statusbar - MauriceZrideindegochecker - josepvallsRitsWifi - fang2housafety-bar - pyupioSAT-Vocab-Quizzer - Legobensb-translate - leandroltavaressharfoo - furqan-shakoorShortyURLShortener - Naktremshotput - amusseySingMenuData - ponyfleischslack-status-bar - ericwbslackify - nikodracaSnapgrid - VladUsatiisnippets - quillfordsonostus - sarkkineSpaceapi-Desktop - UrLabSpaceSwitcher - SankaitLaroiyaSpotifyLyrics - yask123steemticker-osx - ZachC16Timebar - devonkongTimebox - visiniTelkom-ADSL-Data-Usage - parautenbachTelton - YywwwTextinator - RhetTbullthese-days - hahayestime-tracking - willsgriggtimerbar - uberalextracker - jtxx000TrojanA - chrisxiaoumma - mankoffupbrew - stchrisuptimeIndicator - paulabordeurstatus - kyselyuStatus - kdungsVagrantBar - kingsdigitallabvoiceplay - tb0hdanvolsbb - akigugaleVolumio_bar - volderettevotingpowerbar - therealwolf42VPN Handler - tsarenkotxtWakeTime App - dleichtWallpDesk - L3rchalwebcronic - josselinaugusteWhale - amkaWhyFi - OzTamirWordTime - Demonstrandumwork_time_percent_applet - BenhgiftWorkWise - 8ern4ardxCodea - lowneyaca - drproteusZero - beejhuffSubmit a pull request to add your own!ContributingIf you’ve submitted a pull request and need it reviewed, please request a review from@daredoes(contributing in free time, so please be patient)Changes0.4.0 (2022-10-14)Automatically display windows in light or dark mode #162Allow copy, paste, etc #150Allow notifications to be displayed in DND #179Add event hooks, enable multiple event handlers #140Allow menu items to be hidden #138Fix dark mode alert style #137Notifications: fixes, cleanup, and tests #131Fix slider for some older macOS versions (10.11 and before?)Keyboard interrupts now stop a running application0.3.0 (2019-02-01)Fix passing data in notificationsAddotherandicon_pathoptions toalertAddsecureoption toWindowAddaction_button,other_button, andreply_buttonoptions tonotificationAddslider0.2.2 (2017-04-26)Add template icon support for dark menubar theme.Fix inability to create notification center by creatingInfo.plistfile at executable directory withCFBundleIdentifieron installation. If that failed, provide more information at runtime in the exception about how to fix the problem.Add Python 3 support0.2.1 (2014-12-13)No longer have to set menu explicitlyrumps will create the menu as it parses paths inclickeddecoratorsReverted change totimersthat produced a list of weak references rather than objectsNew keyword argumentskeyforclickeddebugforApp.run0.2.0 (2014-08-09)Improvements and compatibility fixesAdded a large number of docstringsMerged pull request allowing unicode textCompatibility fixes for Python 2.6Included OrderedDict recipe_TIMERS not using weakref.WeakSetCompatibility fixes for Mac OS X versions prior to 10.8 (Notification Center)Attempting to send a notification on <10.8 will raiseRuntimeErrorAddedquit_applicationfunction to allow for both custom quit buttons and running clean up code before quittingAPI changesMost api changes dealt with acceptingNoneas a parameter to use or restore a default settingRaiseTypeErrorbefore less obvious exceptions occur in PyObjCalert and WindowNo required parametersPassing a string ascancelparameter will change the button text to that stringWindow.add_buttonnow requires a stringAppnameparameter must be a string andtitlemust be either a string orNoneAddedquit_buttonparameter allowing custom text or disabling completely by passingNoneMenuItemPassingNoneascallbackparameter toMenuItem.set_callbackmethod will disable the callback function and grey out the menu itempassing an invalid sequence fordimensionsparameter toMenuItem.set_iconwill no longer silently error0.1.5 (2014-08-03)Fix implemented for NSInvalidArgumentException issue on 10.9.x0.1.4 (2013-08-21)Menu class subclassing ListDict, a subclass of OrderedDict with additional insertion operationsupdatemethod of Menu works like old App.menu parsing - consumes various nested Python containers and creates menus0.1.3 (2013-08-19)separatorglobal for marking menu separators (in addition to None in context of a menu)Can now have separators in sub menus using eitherseparatoror NoneKey and menu title not matching doesn’t raise an exception since the situation would occur if the title is changed dynamicallyInstead, a warning in the logRefactored MenuItem such that it subclasses new Menu classMenu class createdWraps NSMenu using __setitem__, __delitem__, etc.Allows for main menu to be easily changed during runtime as it now uses Menu class instead of vanilla OrderedDictclearmethod for MenuItem + other irrelevant methods inherited from OrderedDict raise NotImplementedErrorAs result of refactoring, could simplify menu parsing for App0.1.2 (2013-08-11)Interval access and modification added to Timer objectstimers function for iterating over timersTimer class now directly in module namespaceMore specfic case for trying callback with instance of App subclass as first argumentPoint is to avoid catching a completely different TypeError, then sending 2 variables to a function consuming 10.1.1 (2013-08-07)Parsing data structures for creating menus is now more robustFixed MenuItem __repr__ for printing instances where no callback function has been givenAddedexample_menu.pyto examples serving also as a test for new MenuItem changesCan nowdelMenuItems of submenus and it will be reflected in the actual menuaddmethod for more convenient addition of MenuItems to a MenuItem’s submenuCreated module docstring0.1.0 (2013-07-31)world, hello! meet rumps.