Open aarobc opened 3 years ago
Why not just assign your workspaces to monitors in the i3 config?
EDIT: Sorry I should clarify based on your first sentence. My solution to this is to have my i3 config generated by a script that reads config files from ~/.config/i3/conf.d/
. These can be plain text i3 config or bash or python scripts. I get monitor info from xrandr and dynamically allocate the workspaces to monitors based on that info. You can see here how I do this https://github.com/JonnyHaystack/dotfiles/tree/master/i3
It's a shame that assigning workspaces can't be done via an i3ipc command but there are plenty of advantages to making your config scriptable like this anyway.
You're talking about assigning the workspace permanently. My request was to do a one time "move workspace to monitor" step on only when the restore is run. I feel like this would be more consistent with what a user would expect.
You could include the output within the generated config, and upon restore, preform something like
i3.workspace(str(workspace))
i3.command('move', 'workspace to output ' + output['name'])
This would accommodate a much broader range of i3 users, and not require dynamically generating the i3 config (which I'm averse to).
Okay, I get you. i3-resurrect is generally designed around not having to manually edit the layout files, but this seems like a good feature so I'm happy to give that option in the case that you do want to manually add it.
I apologize for the confusion, but my request hopes to avoid any manual editing at all:
Right, I can make a command line flag for that then, seeing as people might not want that behaviour by default
Is your feature request related to a problem? Please describe. Currently the only way to assign a workspace to a monitor is to hardcode it within the i3 config file. This is inconvenient as it limits the portability of the i3 config between machines with different display configurations.
Describe the solution you'd like Upon saving a workspace layout, the current monitor is recorded under an additional property.
Upon restoring a workspace layout, it's created on the monitor configured in the layout file.
Describe alternatives you've considered Hardcoding the workspace within the i3 config. This is much too limiting.