3

I love caffeine, but I really wish it were just a keyboard shortcut or perhaps a command line / terminal command. Has anyone figured out a way to activate / deactivate Caffeine using another method besides clicking?

enter image description here

Gaff
  • 18,569
  • 15
  • 57
  • 68
cwd
  • 17,668
  • 42
  • 121
  • 159
  • Ask the developer to implement a shortcut ? Otherwise you have two options : NO, or you can make a UI applescript hack to access the menubar and click it for you. – Kassym Dorsel Oct 26 '11 at 22:05

1 Answers1

3

Caffeine has a tiny AppleScript dictionary:

tell application "Caffeine"
    if active then
        turn off
    else
        turn on
    end if
end tell

Assign a shortcut to running a script in OS X - Super User

Lri
  • 40,894
  • 7
  • 119
  • 157