mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-28 03:12:46 +01:00
feat(wm): lock
Containers can be locked since the model came in, and a locked container keeps its index while others are inserted, removed or swapped around it; nothing could lock one. `komorebic toggle-lock` locks the focused container, or unlocks it, and the `LockMonitorWorkspaceContainer` and `UnlockMonitorWorkspaceContainer` messages lock and unlock a container by the index of its monitor, its workspace and itself, for a program such as a status bar. The vm-commands sweep locks and unlocks a container.
This commit is contained in:
1 parent
062fe57fac
commit
3cc5dceb7d
11 files changed
+325
-6
No files matched your search
@@ -16,7 +16,8 @@
|
||||
//! next window and give it up.
|
||||
//! - `promote`, `promote-swap`, `promote-focus` and `promote-window` bring a window to the largest
|
||||
//! tile, or the focus to it.
|
||||
//! - `toggle-float` takes the focused window out of the layout, or puts it back.
|
||||
//! - `toggle-float` takes the focused window out of the layout, or puts it back, and
|
||||
//! `toggle-lock` locks the focused container at its index, or unlocks it.
|
||||
//! - `resize-edge` and `resize-axis` resize the focused window by the `resize-delta`, and
|
||||
//! `quick-save-resize`, `quick-load-resize`, `save-resize` and `load-resize` save the sizes of
|
||||
//! the tiles of the focused workspace and load them back.
|
||||
@@ -307,6 +308,8 @@ enum SubCommand {
|
||||
ToggleTiling,
|
||||
/// Toggle floating mode for the focused window
|
||||
ToggleFloat,
|
||||
/// Toggle a lock for the focused container, ensuring it will not be displaced by any new windows
|
||||
ToggleLock,
|
||||
/// Enable or disable mouse follows focus on all workspaces
|
||||
#[clap(arg_required_else_help = true)]
|
||||
MouseFollowsFocus(MouseFollowsFocus),
|
||||
@@ -483,6 +486,9 @@ fn main() -> eyre::Result<()> {
|
||||
SubCommand::ToggleTiling => {
|
||||
send_message(&SocketMessage::ToggleTiling)?;
|
||||
}
|
||||
SubCommand::ToggleLock => {
|
||||
send_message(&SocketMessage::ToggleLock)?;
|
||||
}
|
||||
SubCommand::State => {
|
||||
print_query(&SocketMessage::State);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user