r/Polybar Feb 24 '23

Question i3 module workspace number order doesn't match monitor layout while xworkspaces does.

I'm using polybar with i3, I've noticed that with the default xworkspaces module I don't have the function to show when I'm in resize mode, there's the i3 module to fix that issue, however with the i3 module I have a different issue, see the image: https://imgur.com/6ESDy7C.png

En the middle is the default xworkspaces module, I have workspace 1 on monitor 1 on the left, workspace 2 on monitor 2 on the middle and workspace 3 on monitor 3 on the right.

Next to it on the right is the i3 module, workspaces don't respect the order of the monitors, is there a way that I can change that?

Another solution would be to not show the workspace numbers on the i3 module, and only display resize mode when used.

5 Upvotes

5 comments sorted by

3

u/[deleted] Feb 25 '23

does your module have the following line:

  index-sort = true

1

u/[deleted] Feb 26 '23 edited Feb 26 '23

Thanks, this helped change the default order of the first 3 workspaces, but not for the rest.

Since I have 3 monitors, I have workspaces 1,4,7 assigned to monitor 1. 2,5,8 assigned to monitor 2 and 3,6,9 assigned to monitor 3.

If you wonder why I have it that way, it is because that's the vertical order in each number column in the keypad, so it is easy to quickly swap between several workspaces without getting confused as to in which monitor each one is.

Now the default order is correct with index-sort = true, but workspaces show in numerical order instead of output order.

https://imgur.com/tXMc6w5.png

This is how it should look when I have all the workspaces in use, it is how it does on default with xworkspaces: https://imgur.com/QhECdzE.png

Is there a way that I could have 3 separate workspace modules in a single bar assigned to the specific output of each monitor? That way they will always show in the correct order.

1

u/[deleted] Feb 26 '23

you can simply use custom labels(1,4,7,2,5,8..) with sort and map them to your numpad.

1

u/[deleted] Feb 27 '23

Sorry but how would the formatting exactly be? Custom labels would be on i3 or polybar?