[modules/caffeine] Enable status change notifications
Now that multi-command callbacks work, enable caffeine status change notifications via "notify".
This commit is contained in:
parent
f967eafe99
commit
027541126d
1 changed files with 2 additions and 4 deletions
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue