Workspaces groups
This feature brings a lot of new possibilities.
A workspace group is group of ten workspaces inside a decimal range (ex: from 10 to 19).
It introduces `relative` and `absolute` scopes.
For a move or a focus, if the target index is only one digit it will focus the wanted workspace relative to the current group focused.
But if the target index is above 9, it will directly focus the workspace inside the group if it is already opened, if not, it will open the group on the current screen.
Example 1: I'm focused on 21. If I do `swaysome focus 5` it's going to focus the workspace 25 on the same output than the other 20s.
Example 2: I'm focused on 21. If I do `swaysome focus 35` it's going to focus the workspace 35. If there is no 30s opened yet, it's going to open it on my current screen, but I already have 32 opened on another screen, so it's going to open the workspace 35 on it.
It also brings the `next-group` and `prev-group` features to switch focus from 21 to 31 or 21 to 11 for example.
There is the `focus-group` action that allows you to directly focus a specified group and so creating multiple workspace groups on one output (For example, 20s for work and 30s for private stuff).
There is one breaking behavior: I had to edit the `init` function to begin from 10 and not from 1.
So with `swaysome init 1`, a triple screen is now initialized like this: 11, 21, 31 instead of 1, 11, 21.
See merge request hyask/swaysome!6
Rearrange workspaces
Based of the args parser rework, I added a feature to rearrange the missplaced workspaces.
It is useful when you unplug a screen, create a workspace then plug the screen back.
In this scenario, the screen won't move back to the correct screen when the screen is plugged back.
I don't know if there could be a way to fix this behavior instead of creating a feature to repair it each time.
Let me know what you think
See merge request hyask/swaysome!4
Fix#4: Add workaround for missing `focused` property in outputs
If there is an inactive input, then the `focused` property may be missing in sway's response to a `get_output` message.
This fix uses a feature of serde where default values for missing fields can be defined.
Here, the `Default::default` for booleans is used, which is `false`.
Closes#4
See merge request hyask/swaysome!1
If there is an inactive input, then the `focused` property may be missing in sway's response to a `get_output` message.
This fix uses a feature of serde where default values for missing fields can be defined.
Here, the `Default::default` for booleans is used, which is `false`.