I3: Disabling mouse scroll workspace switching on bar using bindsym doesn't work

Created on 2 Apr 2020  Â·  4Comments  Â·  Source: i3/i3

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

Mouse scrolling on workspace bar is still switching workspaces even after _bindsym button4(/5) nop_ is added to bar block.

Expected Behavior

No workspace switch when scrolling over workspace bar.

Reproduction Instructions

Following the i3 user guide chapter 5.4, add the bindsyms to i3 config inside bar block:

bar {
  bindsym button4 nop
  bindsym button5 nop
  ...
}

(Re)start i3.
Create few workspaces.
Move mouse over the workspace bar.
Scroll mouse up/down.

Environment


Output of i3 --moreversion 2>&-:

$ i3 --moreversion 2>&- || i3 --version
Binary i3 version:  4.18 (2020-02-18) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.18 (2020-02-18) (pid 2884932)bort…)
Loaded i3 config: /home/user/.config/i3/config (Last modified: Thu  2 April 2020 20.11.21, 1650 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
i3 config: https://pastebin.com/H12ZRXKs

Logfile URL: https://logs.i3wm.org/logs/5659835886469120.bz2

- Linux Distribution & Version: Gentoo
- Are you using a compositor (e.g., xcompmgr or compton): Yes, picom. But also tested without it, no change
4.18 bug

Most helpful comment

I think you need to block scroll left/right as well. These are 6 and 7 so add:
bindsym button6 nop and bindsym button7 nop

All 4 comments

Thanks for opening this issue and providing all the information! I personally also use this and it works fine for me. In this case the i3bar log is a bit more relevant, could you please also attach the log file for that? You can find here (Section 7, at the bottom) how to do it: https://i3wm.org/docs/debugging.html

Grabbed a quick log:

  1. Enabled logging as instructed
  2. Scrolled the mouse up and down on the bar
  3. Killed i3bar to stop the log.

Log attached.
i3bar.bar-0.log

I think you need to block scroll left/right as well. These are 6 and 7 so add:
bindsym button6 nop and bindsym button7 nop

D'oh.
@orestisfl is right on the money. I should've thought about the side scroll events but it never even crossed my mind.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mb720 picture mb720  Â·  3Comments

Sonahaim picture Sonahaim  Â·  3Comments

tankmohit picture tankmohit  Â·  3Comments

rgaufman picture rgaufman  Â·  4Comments

acrisci picture acrisci  Â·  4Comments