Activating ‘Dark Mode’ in macOS 10.14 / RF 3.2


  • admin

    to all users of macOS 10.14 Mojave:

    RoboFont 3.2 adds experimental support for Dark Mode.

    here’s a script to toggle it on/off:

    import AppKit
    
    aqua = AppKit.NSAppearance.appearanceNamed_(AppKit.NSAppearanceNameAqua)
    dark = AppKit.NSAppearance.appearanceNamed_(AppKit.NSAppearanceNameDarkAqua)
    
    if AppKit.NSApp().appearance() == aqua:
       appearance = dark
    elif AppKit.NSApp().appearance() == dark:
       appearance = aqua
    else:
       # custom appearance
       appearance = None
    
    if appearance:
       AppKit.NSApp().setAppearance_(appearance)
    

    😎 enjoy…!