justbuchanan / i3scripts

My scripts for enhancing i3wm
Other
163 stars 46 forks source link

Skipping some numbers in multiscreen mode #11

Closed vdimir closed 5 years ago

vdimir commented 6 years ago

I found numbering a little bit strange. I found some information about it in code, but why we need do keep gap in numbering? As I understand if we remove following lines we got standard behavior, but what problems may occurs with it? https://github.com/justbuchanan/i3scripts/blob/52a39abd6371f7c9d03c9bbc1a08f33a833cb6a4/autoname_workspaces.py#L117

justbuchanan commented 6 years ago

I leave a gap in numbers to help the new_workspace.py script work. That script creates a new workspace on the current monitor using the first available number (the number that's skipped) and optionally moves the currently focused window/container to it. See the code here: https://github.com/justbuchanan/i3scripts/blob/52a39abd6371f7c9d03c9bbc1a08f33a833cb6a4/new_workspace.py#L32-L33.

Thinking about this some more, it should be possible to do what I want without skipping the number and I might be able to change it to do so.