Every monitor has workspaces of its own, which KWin's per-output desktops show independently, so a second monitor is mostly the window manager's business: which monitor has the focus, and how a window gets from one to the other. At the edge of a monitor, focus and move now cross to the monitor on that side, where they used to fail with "there is no container in this direction": the focus lands on the container nearest the monitor it came from, and a move swaps with the container at that edge (cross-monitor-move-behaviour insert puts it in among the containers there, no-op keeps it). A window that opens or gets the focus on a monitor that is not the focused one focuses that monitor, which also makes the scrolling test of a strip next to another monitor guard real code. The monitor commands come with it: focusing a monitor by index, in order or under the pointer, a workspace of another monitor, moving and sending the focused window to another monitor, to a workspace of it or to a named workspace (in the window manager these are moves between monitors, so they were left out of the workspace commands), moving and swapping workspaces between monitors, and a display index preference that keeps a monitor at the index the user gives it. eager-focus focuses the first window of an executable on any workspace of any monitor; its window is found in a container or among the floating windows, the two places a window can be until stacks, monocle and maximize exist.
3.0 KiB
Focusing windows
komorebi gives the focus to another window of the focused workspace when it is told to. It moves no window to do it: the windows stay on their tiles, and KWin makes the chosen one the active window.
In a direction
komorebic focus focuses the window whose tile is on one side of the
focused one: left, right, up or down. Which tile is on which side is the layout's
business. In the BSP layout with three windows, for example, the first window has the left
half, and focus right from it goes to the window at the top right.
komorebic focus left
komorebic focus down
komorebic focus up
komorebic focus right
When there is no tile on that side, the focus goes to the monitor on that side, if there is one,
to the tile nearest the monitor the focus came from: focus right lands on the leftmost tile of
the monitor on the right. With no monitor there either, nothing happens, and the daemon logs
"there is no container or monitor in this direction".
komorebic focus-monitor focuses a monitor by its index,
komorebic cycle-monitor the next or the previous one, and
komorebic focus-monitor-at-cursor the one the pointer is
on. komorebic eager-focus focuses the first window komorebi manages of
an executable, whichever workspace of whichever monitor it is on, and shows its workspace.
komorebic focus-monitor 1
komorebic eager-focus firefox
In order
komorebic cycle-focus focuses the next or the previous window in the
order of the workspace, which is the order in which the windows were opened, each new one
after the window that had the focus. It wraps around: next from the last window is the
first.
komorebic cycle-focus next
komorebic cycle-focus previous
The largest tile
komorebic promote-focus focuses the window on the first tile of the
layout, which is its largest (Moving windows).
The pointer
By default the pointer moves to the middle of the window that is given the focus. komorebi asks
KWin to do it with its "Move Mouse to Focus" shortcut, so the pointer follows only in a session
that has KWin's global shortcuts (a headless KWin has none).
komorebic mouse-follows-focus turns this on or off, and
komorebic toggle-mouse-follows-focus switches between
the two:
komorebic mouse-follows-focus disable
komorebic toggle-mouse-follows-focus
The setting is in the daemon's state as mouse_follows_focus, and it lasts until the daemon
stops.
Binding them to keys
komorebi reads no keys. Bind the commands to keys in Plasma's System Settings, under Keyboard,
Shortcuts, as custom shortcuts that run a command: for example Meta+H for
komorebic focus left and Meta+L for komorebic focus right.