mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-30 22:22:08 +02:00
feat(cli): add focus-monitor-at-cursor cmd
This commit adds a new komorebic command, focus-monitor-at-cursor, which can optionally be chained with the focus-workspace command in keybindings to reproduce the previous default behaviour of auto-focusing whichever monitor the cursor was on before attempting to change the focused workspace.
This commit is contained in:
@@ -1108,6 +1108,8 @@ enum SubCommand {
|
||||
/// Focus the specified monitor
|
||||
#[clap(arg_required_else_help = true)]
|
||||
FocusMonitor(FocusMonitor),
|
||||
/// Focus the monitor at the current cursor location
|
||||
FocusMonitorAtCursor,
|
||||
/// Focus the last focused workspace on the focused monitor
|
||||
FocusLastWorkspace,
|
||||
/// Focus the specified workspace on the focused monitor
|
||||
@@ -2588,6 +2590,9 @@ if (Get-Command Get-CimInstance -ErrorAction SilentlyContinue) {
|
||||
SubCommand::FocusMonitor(arg) => {
|
||||
send_message(&SocketMessage::FocusMonitorNumber(arg.target))?;
|
||||
}
|
||||
SubCommand::FocusMonitorAtCursor => {
|
||||
send_message(&SocketMessage::FocusMonitorAtCursor)?;
|
||||
}
|
||||
SubCommand::FocusLastWorkspace => {
|
||||
send_message(&SocketMessage::FocusLastWorkspace)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user