mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-07 05:25:21 +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:
@@ -119,6 +119,7 @@ pub enum SocketMessage {
|
||||
CycleFocusMonitor(CycleDirection),
|
||||
CycleFocusWorkspace(CycleDirection),
|
||||
FocusMonitorNumber(usize),
|
||||
FocusMonitorAtCursor,
|
||||
FocusLastWorkspace,
|
||||
CloseWorkspace,
|
||||
FocusWorkspaceNumber(usize),
|
||||
|
||||
@@ -735,6 +735,11 @@ impl WindowManager {
|
||||
self.focus_monitor(monitor_idx)?;
|
||||
self.update_focused_workspace(self.mouse_follows_focus, true)?;
|
||||
}
|
||||
SocketMessage::FocusMonitorAtCursor => {
|
||||
if let Some(monitor_idx) = self.monitor_idx_from_current_pos() {
|
||||
self.focus_monitor(monitor_idx)?;
|
||||
}
|
||||
}
|
||||
SocketMessage::Retile => {
|
||||
border_manager::destroy_all_borders()?;
|
||||
self.retile_all(false)?
|
||||
|
||||
Reference in New Issue
Block a user