From 1e13798c958e2ddbd33aba70dfed09204ab5f925 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Wed, 28 Apr 2021 12:41:04 +0200 Subject: [PATCH] [core/input] add pseudo-event "update" to selectively update modules to trigger an update of a module (without actually triggering a mouse interaction), use the special event "update": bumblebee-ctl -m -b update see #784 --- bumblebee-ctl | 3 ++- bumblebee_status/core/input.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bumblebee-ctl b/bumblebee-ctl index b1c0f37..435162d 100755 --- a/bumblebee-ctl +++ b/bumblebee-ctl @@ -12,6 +12,7 @@ button = { "right-mouse": 3, "wheel-up": 4, "wheel-down": 5, + "update": -1, } @@ -20,7 +21,7 @@ def main(): parser.add_argument( "-b", "--button", - choices=["left-mouse", "right-mouse", "middle-mouse", "wheel-up", "wheel-down"], + choices=["left-mouse", "right-mouse", "middle-mouse", "wheel-up", "wheel-down", "update"], help="button to emulate", default="left-mouse", ) diff --git a/bumblebee_status/core/input.py b/bumblebee_status/core/input.py index b0d9f23..2f9fdfc 100644 --- a/bumblebee_status/core/input.py +++ b/bumblebee_status/core/input.py @@ -10,6 +10,7 @@ MIDDLE_MOUSE = 2 RIGHT_MOUSE = 3 WHEEL_UP = 4 WHEEL_DOWN = 5 +UPDATE = -1 def button_name(button): @@ -23,6 +24,8 @@ def button_name(button): return "wheel-up" if button == WHEEL_DOWN: return "wheel-down" + if button == UPDATE: + return "update" return "n/a"