mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
feat(wm): add force-focus command
On rare occasions and usually with Firefox, the desired application will fail to be focused with the regular focus commands. This commit introduces a new command, force-focus, which can be used to simulate a left-click on a window that has failed to take focus, since this is what I have to do to work around the issue anyway.
This commit is contained in:
@@ -557,6 +557,8 @@ enum SubCommand {
|
||||
Minimize,
|
||||
/// Close the focused window
|
||||
Close,
|
||||
/// Forcibly focus the window at the cursor with a left mouse click
|
||||
ForceFocus,
|
||||
/// Change focus to the window in the specified cycle direction
|
||||
#[clap(arg_required_else_help = true)]
|
||||
CycleFocus(CycleFocus),
|
||||
@@ -831,6 +833,9 @@ fn main() -> Result<()> {
|
||||
SubCommand::Focus(arg) => {
|
||||
send_message(&SocketMessage::FocusWindow(arg.operation_direction).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::ForceFocus => {
|
||||
send_message(&SocketMessage::ForceFocus.as_bytes()?)?;
|
||||
}
|
||||
SubCommand::Close => {
|
||||
send_message(&SocketMessage::Close.as_bytes()?)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user