diff --git a/bumblebee/engine.py b/bumblebee/engine.py index f0b6e03..5c8d848 100644 --- a/bumblebee/engine.py +++ b/bumblebee/engine.py @@ -66,6 +66,12 @@ class Engine(object): self._modules = [] self.input = inp self.load_modules(config.modules()) + + self.input.register_callback(None, bumblebee.input.WHEEL_UP, + "i3-msg workspace prev_on_output") + self.input.register_callback(None, bumblebee.input.WHEEL_DOWN, + "i3-msg workspace next_on_output") + self.input.start() def load_modules(self, modules): diff --git a/bumblebee/input.py b/bumblebee/input.py index 75eaec6..76b9bf6 100644 --- a/bumblebee/input.py +++ b/bumblebee/input.py @@ -9,6 +9,8 @@ import bumblebee.util LEFT_MOUSE = 1 RIGHT_MOUSE = 3 +WHEEL_UP = 4 +WHEEL_DOWN = 5 def read_input(inp): """Read i3bar input and execute callbacks"""