Add '--release' flag for bindsym in the bar block
i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE events. During these button release events, only custom commands are checked to avoid sending multiple workspace ipc messages. The way this patch is implemented will allow to assign a custom command for both the press and release of the same button: bar { ... bindsym buttonX exec command1 bindsym --release buttonX exec command2 } Fixes #3068.
This commit is contained in:
@ -1377,7 +1377,7 @@ and will be removed in a future release. We strongly recommend using the more ge
|
||||
|
||||
*Syntax*:
|
||||
----------------------------
|
||||
bindsym button<n> <command>
|
||||
bindsym [--release] button<n> <command>
|
||||
----------------------------
|
||||
|
||||
*Example*:
|
||||
@ -1385,6 +1385,8 @@ bindsym button<n> <command>
|
||||
bar {
|
||||
# disable clicking on workspace buttons
|
||||
bindsym button1 nop
|
||||
# Take a screenshot by right clicking on the bar
|
||||
bindsym --release button3 exec --no-startup-id import /tmp/latest-screenshot.png
|
||||
# execute custom script when scrolling downwards
|
||||
bindsym button5 exec ~/.i3/scripts/custom_wheel_down
|
||||
}
|
||||
|
Reference in New Issue
Block a user