From 027541126dcd7a0c0142cc8997a858dd8579c5a7 Mon Sep 17 00:00:00 2001 From: Tobi-wan Kenobi Date: Wed, 23 Nov 2016 18:29:05 +0100 Subject: [PATCH] [modules/caffeine] Enable status change notifications Now that multi-command callbacks work, enable caffeine status change notifications via "notify". --- bumblebee/modules/caffeine.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bumblebee/modules/caffeine.py b/bumblebee/modules/caffeine.py index 5d0dbaf..39f20d5 100644 --- a/bumblebee/modules/caffeine.py +++ b/bumblebee/modules/caffeine.py @@ -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"))