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

pin-workspaces not working with i3-gaps #1925

Closed
marcospb19 opened this issue Oct 30, 2019 · 10 comments
Closed

pin-workspaces not working with i3-gaps #1925

marcospb19 opened this issue Oct 30, 2019 · 10 comments

Comments

@marcospb19
Copy link

marcospb19 commented Oct 30, 2019

Description

I have a 2-monitor setup
pin-workspaces isn't hiding workspaces at the other monitor from the bar.

Expected behavior:
Workspaces at monitor 1 only appear to the bar 1
Workspaces at monitor 2 only appear to the bar 2

Actual behavior:
All workspaces appear in all bars

Was it working before?
pin-workspaces never worked to me

To Reproduce

pin-workspaces = true

Having a 2-monitor setup, open a workspace at each monitor

Polybar Log

error: tray: Failed to put tray above 0x0a00001 in the stack (XCB_MATCH (8))                                               
error: tray: Failed to put tray above 0x1000001 in the stack (XCB_MATCH (8))
warn: Systray selection already managed (window=0x0a00005)                                                                          

Screenshots

Workspaces 1 and 2 are located on the left monitor
Workspaces 3 and 4 are located on the right monitor
This is how the bar looks on each monitor:
"3412"
image

It should only show 1,2 and 3,4 for each one
(for some reason the workspaces at the left monitor appear at the right, it's flipped)

Environment:

  • WM: i3-Gaps
  • Distro: Arch Linux
  • Output of polybar -vvv:
polybar 3.4.0-29-g6849b8a5

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -Wpedantic -O3 -DNDEBUG
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now 

Additional context

I already tried to compile Polybar

@Lomadriel
Copy link
Member

Can you post your config.

@ronniedroid
Copy link

@marcospb19 you have a mistake in your comment

Workspaces 1 and 2 are located on the left monitor
Workspaces 3 and 4 are located on the left monitor

it should be left and right.

best

@patrick96
Copy link
Member

I think this might be related to #1849

@marcospb19
Copy link
Author

@marcospb19 you have a mistake in your comment

Thanks for pointing that out, now it is correct, and I added more explanation. Please read it again

@marcospb19
Copy link
Author

marcospb19 commented Oct 31, 2019

I removed unnecessary stuff from my configuration file to ease our debugging process, here are my configuration files.


~/.config/polybar/config

[bar/eDP]
inherit = bar/main
monitor = eDP
pin-workspaces = true

[bar/HDMI]
inherit = bar/main
monitor = HDMI-A-0
pin-workspaces = true

[bar/main]
modules-center = i3

enable-ipc = true
pin-workspaces = true

font-0 = Noto Sans Mono:style=bold:pixelsize=11.4
background = #2d2b2b
foreground = #bbc2cf

height = 26
line-size = 4
line-color = #f00

[module/i3]
type = internal/i3
enable-click = true

label-focused = %index%
label-focused-foreground = #eee
label-focused-background = #444
label-focused-underline = #34d8d3
label-focused-padding = 2

label-unfocused = %index%
label-unfocused-foreground = #a9a9a9
label-unfocused-underline = #454443
label-unfocused-padding = 2

label-visible = %index%
label-visible-underline = #454443
label-visible-padding = 2

~/.config/polybar/launch.sh

#!/bin/bash

killall -q polybar
while pgrep -u $UID -x polybar > /dev/null; do sleep 0.2; done

polybar HDMI &
sleep 0.15 # Making sure that the first run first
polybar eDP &

Running the launch script with this configuration gives no warnings.

patrick96 added a commit to patrick96/polybar that referenced this issue Nov 1, 2019
Before the module would just try to evenly distribute desktops
(workspaces) among the viewports.

But since `_NET_DESKTOP_VIEWPORT` actually maps desktops to viewports,
we can use that information to assign workspaces to the right viewport.

Fixes polybar#1925
Fixes polybar#1849
Fixes polybar#1764
@patrick96
Copy link
Member

Could you please try the fix in #1929

@marcospb19
Copy link
Author

Could you please try the fix in #1929

Didn't work

Compiled from your branch, (commit 7bb3529), then I replaced /usr/bin/polybar and /usr/bin/polybar-msg with the new objects from build/bin/, killed the polybar process and ran it again. The problem persists.

@patrick96
Copy link
Member

Hmm, seems I missed something along the way. Thanks for testing

@patrick96
Copy link
Member

Oh wow, I didn't read your post thoroughly enough, I though you were using the xworkspaces module.

pin-workspaces is a property of the i3 module, setting in the bar section doesn't do anything.

@marcospb19
Copy link
Author

Thanks for all the help 👍 , and sorry for the dumb confusion here 😞.

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

No branches or pull requests

4 participants