Skip to content

Commit

Permalink
[modules/caffeine] Enable status change notifications
Browse files Browse the repository at this point in the history
Now that multi-command callbacks work, enable caffeine status change
notifications via "notify".
  • Loading branch information
tobi-wan-kenobi committed Nov 23, 2016
1 parent f967eaf commit 0275411
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bumblebee/modules/caffeine.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ class Module(bumblebee.module.Module):
def __init__(self, output, config, alias):
super(Module, self).__init__(output, config, alias)
self._activated = 0
# output.add_callback(module="caffeine.activate", button=1, cmd='notify-send "Consuming caffeine"; xset s off')
# output.add_callback(module="caffeine.deactivate", button=1, cmd='notify-send "Out of coffee"; xset s 600 600')
output.add_callback(module="caffeine.activate", button=1, cmd='xset s off')
output.add_callback(module="caffeine.deactivate", button=1, cmd='xset s default')
output.add_callback(module="caffeine.activate", button=1, cmd=[ 'notify-send "Consuming caffeine"', 'xset s off' ])
output.add_callback(module="caffeine.deactivate", button=1, cmd=[ 'notify-send "Out of coffee"', 'xset s default' ])

def widgets(self):
output = subprocess.check_output(shlex.split("xset q"))
Expand Down

0 comments on commit 0275411

Please sign in to comment.