A daemon to proxy events triggered by mouse thumbwheels in order to debounce rapid events. Should be compatible with i3 as well, but not tested.
The original motivation was my desire to use the thumbwheel of the MX Master 3S in order to scroll through sway workspaces (workspace prev and workspace next).
Binding the thumbwheel motions to key presses (which in turn, are bound to sway commands in the sway config) was possible using the great logiops project.
However, events triggered too often when scrolling normally and increasing the interval option in the logiops config led to decreased responsiveness.
This repository provides server and client binaries which proxy workspace commands to debounce them within a configurable interval.
Server and client communicate via Unix Domain Sockets.
The server and client binaries can only be configured via CLI arguments (see ./server -h and ./client -h for reference):
--debounce-millis <millis>: Milliseconds during which to debounce incoming messages. Default:200--socket-path <path>: File path at which the IPC socket will live. Default:/tmp/sway-thumbwheel-proxy
You need the paths of the binaries so note them down.
set $mod Mod4
# Run server in the background
exec_always /path/to/server/binary
bindsym $mod+Prior exec /path/to/client/binary prev
bindsym $mod+Next exec /path/to/client/binary nextObviously, you don't need to use logiops in order to use the daemon. Nonetheless, for reference, here is my setup for the thumbwheel on the MX Master 3S.
thumbwheel:
{
divert: true;
invert: false;
left: {
mode: "OnInterval";
interval: 2;
action: {
type: "Keypress"
keys: ["KEY_LEFTMETA", "KEY_PAGEUP"]
}
};
right: {
mode: "OnInterval"
interval: 2;
action: {
type: "Keypress"
keys: ["KEY_LEFTMETA", "KEY_PAGEDOWN"]
}
};
};
Currently supported:
swaymsg workspace prev=>client prevswaymsg workspace next=>client nextswaymsg workspace prev_on_output=>client prev_on_outputswaymsg workspace next_on_output=>client next_on_output