mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
Save window size #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yydcnjjw on GitHub (Sep 21, 2021).
Originally assigned to: @LGUG2Z on GitHub.
The window size is reset when the minimized window is restored.
@LGUG2Z commented on GitHub (Sep 21, 2021):
This is intended behaviour as
komorebionly manages visible windows, and explicitly unmanages windows on minimization.However, I think it should be possible to add commands to quickly save and restore resized layouts per-workspace. I will take a look into how this might be implemented and report back in this issue.
@LGUG2Z commented on GitHub (Sep 22, 2021):
80bcb51f75adds 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 aVec<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
Vecis greater than the number of containers on a workspace, theVecwill be truncated whenWorkspace.updateis run, and similarly if the number of elements is less than the number of containers on a workspace, theVecwill be extended by the difference using None values.@greghart commented on GitHub (Jun 11, 2025):
Thanks so much for this! These commands provided exactly what I needed.
For anyone else like me googling their way here (there seemed to be a discussion @ https://github.com/LGUG2Z/komorebi/discussions/957 but it's 404ing now), and wondering how to get workspace specific sizes saved (eg. resize workspace 1 and 2 distinctly), you can use the
query focused-workspace-indexcommand withsave-resizeto save workspace specific sizes, like so: