feat(wm): add monitor index preference cmd

This commit adds a new komorebic command, monitor-index-preference,
which allows the user to set the index preference within the VecDeque of
monitors based on the "size" of a display.

This works as the size Rect identifies a unique display on the greater
virtual screen and persists across display connections and
disconnections unless the user deliberately changes the positioning of
the display monitor on the virtual screen.

When a new monitor is added to the state, the monitor preferences will
be checked, and if a preference exists, the new monitor will be inserted
at that index, otherwise, it will be pushed to the back of the VecDeque.

resolve #275
This commit is contained in:
LGUG2Z
2022-10-26 16:00:02 -07:00
committed by جاد
parent 37f1a163cc
commit 2575ca2da4
7 changed files with 107 additions and 3 deletions

View File

@@ -180,6 +180,10 @@ Retile() {
RunWait, komorebic.exe retile, , Hide
}
MonitorIndexPreference(index_preference, left, top, right, bottom) {
RunWait, komorebic.exe monitor-index-preference %index_preference% %left% %top% %right% %bottom%, , Hide
}
EnsureWorkspaces(monitor, workspace_count) {
RunWait, komorebic.exe ensure-workspaces %monitor% %workspace_count%, , Hide
}