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

Gareth
  • 18,809
cwd
  • 18,148
  • 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
  • 41,444