feat(cli): implement manage and unmanage cmds

In implementing these two I'm diverging from how komorebi for Windows
handles these a little by tracking the window IDs of manually unmanaged
applications in a global vec UNMANAGED_WINDOW_IDS.

This is due to other changes in how Show and Destroy are handled in
komorebi for macOS which means we can't just piggy-back on those
handlers like we used to.
This commit is contained in:
LGUG2Z committed 2025-09-25 12:34:07 -07:00
1 parent 20d6121568
commit c59e882a2d
8 files changed
+144 -10

No files matched your search

+10 -4
View File
@@ -929,10 +929,10 @@ enum SubCommand {
ToggleLock,
// /// Restore all hidden windows (debugging command)
// RestoreWindows,
// /// Force komorebi to manage the focused window
// Manage,
// /// Unmanage a window that was forcibly managed
// Unmanage,
/// Force komorebi to manage the focused window
Manage,
/// Unmanage a window that was forcibly managed
Unmanage,
// /// Replace the configuration of a running instance of komorebi from a static configuration file
// #[clap(arg_required_else_help = true)]
// ReplaceConfiguration(ReplaceConfiguration),
@@ -1313,6 +1313,12 @@ fn main() -> eyre::Result<()> {
SubCommand::Minimize => {
send_message(&SocketMessage::Minimize)?;
}
SubCommand::Manage => {
send_message(&SocketMessage::ManageFocusedWindow)?;
}
SubCommand::Unmanage => {
send_message(&SocketMessage::UnmanageFocusedWindow)?;
}
SubCommand::Promote => {
send_message(&SocketMessage::Promote)?;
}