Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Polybar doesn't sync xworkspaces correctly #3097

Open
5 tasks done
AllanGErnst opened this issue Feb 22, 2024 · 3 comments
Open
5 tasks done

[Bug]: Polybar doesn't sync xworkspaces correctly #3097

AllanGErnst opened this issue Feb 22, 2024 · 3 comments

Comments

@AllanGErnst
Copy link

AllanGErnst commented Feb 22, 2024

Checklist

  • I have read the appropriate section in the contributing guidelines
  • I believe this issue is a problem with polybar itself and not a misconfiguration on my part
  • I have searched for other open and closed issues that may have already reported this problem
  • I have checked the known issues page for this problem.
  • I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

polybar --log=trace --config=~/.config/polybar/config.ini mybar &

Minimal config

[module/xworkspaces]
type = internal/xworkspaces
icon-0 = 1;1
icon-1 = 2;2
icon-2 = 3;3
icon-3 = 4;
icon-4 = 5;
icon-5 = 6;
icon-6 = 7;
icon-7 = 8;󰝚
icon-default =   ; Default icon when not matched

label-active = %icon%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.foreground}
label-active-padding = 3
label-occupied = %icon%
label-occupied-padding = 1
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %icon%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
enable-scroll = false

Polybar log

.....

In WS0, clicking on WS1

- bar: Received button press: 1 at pos(79, 12)
- Found matching input area
- controller: Processing inputdata: #xworkspaces.focus.1
* Forwarding action to modules (module: 'xworkspaces', action: 'focus', data: '1')
* module/xworkspaces: Requesting change to desktop #1
* Delivered action to 1 module
* module/xworkspaces: Rebuilding cache
* Redrawing bar window
- renderer: flush(1 geom=876x28+0+0, falloff=0)
- bar: Detected motion: 0 at pos(78, 12)
- No matching cursor area found
- bar: Detected motion: 0 at pos(77, 12)
- bar: Detected motion: 0 at pos(76, 12)
....

Here WS0 is clicked

- bar: Received button press: 1 at pos(47, 13)
- Found matching input area
- controller: Processing inputdata: #xworkspaces.focus.0
* Forwarding action to modules (module: 'xworkspaces', action: 'focus', data: '0')
* module/xworkspaces: Requesting change to desktop #0
* Delivered action to 1 module
* module/xworkspaces: Rebuilding cache
- bar: Ignoring update (unchanged)
* module/xworkspaces: Rebuilding cache
* Redrawing bar window
- renderer: flush(1 geom=876x28+0+0, falloff=0)
* module/xworkspaces: Rebuilding cache
- bar: Ignoring update (unchanged)
- bar: Detected motion: 0 at pos(48, 13)
- No matching cursor area found
- bar: Detected motion: 0 at pos(48, 13)
- bar: Detected motion: 0 at pos(49, 13)
....

Here WS1 is clicked (but no update)

- bar: Received button press: 1 at pos(81, 13)
- Found matching input area
- controller: Processing inputdata: #xworkspaces.focus.1
* Forwarding action to modules (module: 'xworkspaces', action: 'focus', data: '1')
* module/xworkspaces: Requesting change to desktop #1
* Delivered action to 1 module
- bar: Detected motion: 0 at pos(82, 13)
- Found matching input area

....

Here WS3 is clicked to get active WS away from WS0, that it's stuck in (eventhough xmonad shows WS)

- bar: Received button press: 1 at pos(108, 13)
- Found matching input area
- controller: Processing inputdata: #xworkspaces.focus.3
* Forwarding action to modules (module: 'xworkspaces', action: 'focus', data: '3')
* module/xworkspaces: Requesting change to desktop #3
* Delivered action to 1 module
* module/xworkspaces: Rebuilding cache
* Redrawing bar window
- renderer: flush(1 geom=876x28+0+0, falloff=0)
- bar: Detected motion: 0 at pos(107, 13)
- No matching cursor area found
- bar: Detected motion: 0 at pos(106, 13)

....

After this jump via WS3 I'm able to return to WS0

- bar: Received button press: 1 at pos(45, 12)
- Found matching input area
- controller: Processing inputdata: #xworkspaces.focus.0
* Forwarding action to modules (module: 'xworkspaces', action: 'focus', data: '0')
* module/xworkspaces: Requesting change to desktop #0
* Delivered action to 1 module
* module/xworkspaces: Rebuilding cache
* Redrawing bar window
- renderer: flush(1 geom=876x28+0+0, falloff=0)
- bar: Ignoring update (unchanged)
* module/xworkspaces: Rebuilding cache
- bar: Ignoring update (unchanged)
- bar: Detected motion: 0 at pos(45, 12)
- No matching cursor area found
- bar: Detected motion: 0 at pos(44, 12)
- bar: Detected motion: 0 at pos(43, 12)
- bar: Detected motion: 0 at pos(40, 11)
- bar: Detected motion: 0 at pos(37, 10)
- bar: Detected motion: 0 at pos(26, 6)
- bar: Detected motion: 0 at pos(2, 0)
* module/xworkspaces: Rebuilding cache
- bar: Ignoring update (unchanged)

Expected behavior

Being able to switch back and forth between workspaces regardless of order and content

Actual behavior

I'm experiencing the strangest behavior.

If I have a workspace (let's call it w1) in which either emacs or firefox (and probably several others) is active, and I move from any other workspace to WS0 and back to the same workspace I came from, then w1 hangs as the active workspace in polybar, even though xmonad correctly switches back to where I came from, and from there I can't select WS0 until I've visited a third workspace.

This problem only occurs when I assign my workspaces icons in polybar config and use %icon% for , but not if I omit the assignment of icons in polybar and instead use %name%

Window Manager and Version

xmonad 0.18.0.9

Linux Distribution

ubuntu 22.04

Polybar version

polybar 3.5.7 (same behavior with latest version)

Additional Context / Screenshots

No response

@AllanGErnst
Copy link
Author

Issue turned out to be a conflict between ewmh and dbus logs in xmonad. Solved be removing dbus logs

@kronn
Copy link
Contributor

kronn commented Feb 27, 2024

So, is this solved then? If so, can you close it?

If this still exists, I could try to reproduce this in my xmonad/polybar-setup. Since I am a bit behind in versions, I would do this only if you say the bug still happens.

@AllanGErnst
Copy link
Author

AllanGErnst commented Feb 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants