focusdir - bakkeby/dusk GitHub Wiki
Function | Expected argument | Default keybinding |
---|---|---|
focusdir |
0 , 1 , 2 and 3
|
Super+<arrow key> |
The focusdir
function allows focus to change in a directional manner by calculating the
best suitable candidate based on the position and size of all visible windows.
This may be desirable for grid layouts or the fibonacci spiral / dwindle layouts rather than simply focusing on clients up and down the stack.
- focus on the next client in any direction (up, down, left, right)
- focus wraps around across monitors (as opposed to being isolated to a single monitor)
- focus restricted to floating or tiled windows only (depending on the state of the currently focused client)
- works across workspaces (when more than one workspace is viewed at the same time)
- does not support focusing on stacked clients that are not visible (e.g. deck layout)
- restricted to visible windows only
This is accessible through Super+<arrow>
directional keys.
Tip: When using runtime configuration the direction name can be passed as the argument, making for more readable configuration. The name matching is case-insenstive.
{ modifier = "Super", key = "Left", function = "focusdir", argument = "left" },
{ modifier = "Super", key = "Right", function = "focusdir", argument = "right" },
{ modifier = "Super", key = "Up", function = "focusdir", argument = "up" },
{ modifier = "Super", key = "Down", function = "focusdir", argument = "down" },
External commands:
duskc run_command focusdir 0 # Left
duskc run_command focusdir 1 # Right
duskc run_command focusdir 2 # Up
duskc run_command focusdir 3 # Down
Also see placedir.