mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1290] [MERGED] feat(wm): add padding per monitor #1302
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?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1290
Author: @alex-ds13
Created: 2/23/2025
Status: ✅ Merged
Merged: 2/23/2025
Merged by: @LGUG2Z
Base:
master← Head:feature/workspace-globals📝 Commits (2)
b55f639feat(wm): add padding per monitord43c9aedocs(schema): update schema with monitor padding📊 Changes
7 files changed (+193 additions, -121 deletions)
View changed files
📝
komorebi-client/src/lib.rs(+1 -0)📝
komorebi/src/monitor.rs(+60 -7)📝
komorebi/src/reaper.rs(+1 -13)📝
komorebi/src/static_config.rs(+45 -1)📝
komorebi/src/window_manager.rs(+26 -73)📝
komorebi/src/workspace.rs(+49 -26)📝
schema.json(+11 -1)📄 Description
This commit adds the ability to set a container and workspace padding per monitor. To do so and to simplify any future need of changing some value per monitor and have it pass through to each workspace a new field was added to the
Workspacecalledglobalswhich has a new struct calledWorkspaceGlobalswhich includes any global values that might be needed by the workspace.This field is updated by the monitor for all its workspaces whenever the config is loaded or reloaded. It is also updated on
RetileAlland on the functionupdate_focused_workspace. This should make sure that every time a workspace needs to use it'supdatefunction it has all theglobalsup to date!This also means that now the
updatefunction from workspaces doesn't take any argument at all, reducing all the need to get all thework_area,work_area_offset,window_based_work_area_offsetorwindow_based_work_area_offset_limitsimplifying the callers of this function quite a bit.Lastly this commit has also (sort of accidentaly) fixed an existing bug with the
move_workspace_to_monitorfunction which was removing the workspace from a monitor but wasn't changing it'sfocused_workspace_idxmeaning that komorebi would get all messed up after that command, like theborder_managerwould get stuck and the komorebi-bar would crash. Now theremove_focused_workspacefunction also focus the previous workspace (which in turn will create a new workspace in case the removed one was the last workspace).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.