Closed takinoy closed 4 years ago
Other than the minor comments I've left, I have another concern. This change makes it so if the workspace name is numeric, it will match the first workspace is in the tree with that number. This prompts me to ask the following question: What if the first "num" match is not the closest "name" match? Consider the following scenario:
i3-msg workspace number 10
takes me to workspace "10:", not workspace "10".i3-resurrect save -w 10
would save workspace "10:" not workspace "10", and you would have no way to save workspace "10".So it may be necessary to have an option to specify numeric mode. Maybe something like i3-resurrect save -n -w 10
. That way it will behave like i3-msg workspace number N
only when people want it to, and otherwise would still work as expected.
@JonnyHaystack Yes I'm aware about this behavior.
I have considered to add extra option but thinking to avoid unnecessary extra complexity.
Your proposal to add -n option like save -n -w 10
seem to be good to avoid confusion
Okay I can put that option in when I do the merge then. Thanks!
This pull request allow selecting workspace by number.
When a number is provided to --workspace option, the workspace that match the corresponding number is selected. It work's for save and restore commands.