mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-20 08:34:04 +01:00
This commit adds the concept of locked container indexes to komorebi workspaces. When a container index is locked, it can only be displaced by manual user actual - usually when another container is moved there, and when this happens, that container becomes the locked container. In the locked state, the container at the locked index should never be displaced by new windows opening or existing windows around it being closed. When the total number of containers on a workspace falls below the number of the locked index, the locked index will be removed. A locked index can be identified by a special border color linked to the new WindowKind::UnfocusedLocked variant. The implementation of locked container indexes is backed by a new data structure called a LockedDeque, which is a VecDeque with an auxiliary HashSet which keeps track of locked indices. A new komorebic command "toggle-lock" has been added to support programmatic use of this feature, as well as the LockMonitorWorkspaceContainer and UnlockMonitorWorkspaceContainer SocketMessage variants which can be used by status bars.
86 KiB
86 KiB