config: implement map-pointer command

This command takes a mode, modifiers, button/event name, and pointer
action as arguments. It stores these in the config data structure.

The currently available pointer actions are move-view and resize-view,
which replace the previously hard-coded functionality.

Closing the hovered view with middle click has temorarily been removed
until it is decided if we wish to make this another special pointer
action or perhaps allow running any arbitrary command (which would of
course include close).
This commit is contained in:
Isaac Freund
2020-08-24 14:52:47 +02:00
parent fd8c5e6410
commit 989e7aaeda
14 changed files with 240 additions and 86 deletions

View File

@ -37,6 +37,12 @@ riverctl map normal $mod L mod-master-factor +0.05
riverctl map normal $mod+Shift H mod-master-count +1
riverctl map normal $mod+Shift L mod-master-count -1
# Mod + Left Mouse Button to move views
riverctl map-pointer normal $mod BTN_LEFT move-view
# Mod + Right Mouse Button to resize views
riverctl map-pointer normal $mod BTN_RIGHT resize-view
for i in $(seq 1 9); do
tagmask=$((1 << ($i - 1)))