Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wm): add quicksaving/loading of sizes/layouts
This commit adds two new komorebic commands to quicksave and quickload BSP layouts with custom resize dimensions. The quicksave file is stored at ${Env:TEMP}/komorebi.quicksave.json, and is a Vec<Option<Rect>> serialized to JSON. If a user tries to quickload without a quicksave file being present, an error will be logged. At this point there is only one quicksave file which will always be overwritten whenever the quicksave command is called. Both commands will only operate on the focused workspace of the focused monitor. This means that you can quicksave a layout on one workspace, and then quickload it onto multiple other workspaces (individually) on the same or other monitors. If the number of elements in the deserialized Vec is greater than the number of containers on a workspace, the Vec will be truncated when Workspace.update is run, and similarly if the number of elements is less than the number of containers on a workspace, the Vec will be extended by the difference using None values. resolve #39
- Loading branch information
Showing
7 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters