Closed benbc7 closed 5 years ago
Thanks for this!!!
i3 and Polybar went crazy with my setup when I first tried to get this working, it freaked me out for a minute watching all my workspaces / windows jump all over the place.
Sorry for taking so long to reply to this, it completely slipped past me.
I can look into adding a command-line flag to the script to make re-numbering optional, which should fix this.
To help me understand the problem better, does this issue only arise when you have i3 configured to assign certain apps to certain workspaces? What does that section of your i3 config look like?
The reason this happened was because I have multiple monitors and like to have workspaces assigned to each. I had 1-5 assigned to one monitor, and the other had 6-10. I also had chrome assigned to workspace 6. When I would launch chrome, it would launch on workspace 6, and then the script would rename that workspace to a different number after adding the gap for multiple monitors. Sometimes this made chrome jump all around to different workspaces and monitors, sometimes i3 just crashed entirely. By removing the gap between monitors it fixed the issue. You can check out a fixed version of your script, as well as my i3 and polybar config files on my dotfiles repo https://github.com/benbc7/dotfiles
This should be fixed in https://github.com/justbuchanan/i3scripts/pull/17.
When you assign a workspace to a specific output the script renames that workspace with a different number and crashes i3. On top of that, I had google chrome assigned to a specific workspace, and when I launched chrome, i3 put it on the new workspace on the assigned output, then the script renamed that workspace and i3 froze completely.
I have fixed this issue by commenting out the lines that add the gap in numbers for multiple monitors, and setting the new workspace name with the old workspace number instead of n