From 7398bf9f94992945ec03bd2a13b9e8cd49c9e66a Mon Sep 17 00:00:00 2001 From: Frank Scherrer Date: Fri, 14 Jun 2019 12:04:36 +0200 Subject: [PATCH] add code to consider brightnessctl binary for brightness module --- bumblebee/modules/brightness.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bumblebee/modules/brightness.py b/bumblebee/modules/brightness.py index 749f608..9943364 100644 --- a/bumblebee/modules/brightness.py +++ b/bumblebee/modules/brightness.py @@ -28,6 +28,11 @@ class Module(bumblebee.engine.Module): cmd="light -A {}%".format(step)) engine.input.register_callback(self, button=bumblebee.input.WHEEL_DOWN, cmd="light -U {}%".format(step)) + elif bumblebee.util.which("brightnessctl"): + engine.input.register_callback(self, button=bumblebee.input.WHEEL_UP, + cmd="brightnessctl s {}%+".format(step)) + engine.input.register_callback(self, button=bumblebee.input.WHEEL_DOWN, + cmd="brightnessctl s {}%-".format(step)) else: engine.input.register_callback(self, button=bumblebee.input.WHEEL_UP, cmd="xbacklight +{}%".format(step))