Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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
up vote 3 down vote accepted

Caffeine has a tiny AppleScript dictionary:

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

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

share|improve this answer
How can you tell what is in the application's Applescript dictionary? – cwd Oct 27 '11 at 19:27
@cwd Open Dictionary (⇧⌘O) in AppleScript Editor. – user495470 Oct 28 '11 at 4:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.