feat(wm): add close and minimize cmd

this commit adds the ability to close and minimize the current focused window via SocketMessages and
komorebic commands

resolve #189
This commit is contained in:
Yusuf007R
2022-10-11 18:12:06 -05:00
committed by جاد
parent 635272fc10
commit 33965f92ad
5 changed files with 29 additions and 0 deletions

View File

@@ -517,6 +517,10 @@ enum SubCommand {
/// Move the focused window in the specified direction
#[clap(arg_required_else_help = true)]
Move(Move),
/// Minimize the focused window
Minimize,
/// Close the focused window
Close,
/// Change focus to the window in the specified cycle direction
#[clap(arg_required_else_help = true)]
CycleFocus(CycleFocus),
@@ -775,6 +779,12 @@ fn main() -> Result<()> {
SubCommand::Focus(arg) => {
send_message(&SocketMessage::FocusWindow(arg.operation_direction).as_bytes()?)?;
}
SubCommand::Close => {
send_message(&SocketMessage::Close.as_bytes()?)?;
}
SubCommand::Minimize => {
send_message(&SocketMessage::Minimize.as_bytes()?)?;
}
SubCommand::Promote => {
send_message(&SocketMessage::Promote.as_bytes()?)?;
}