Created
July 21, 2025 14:21
-
-
Save thkoch2001/47dc084079e8b16156a59371fce37b07 to your computer and use it in GitHub Desktop.
use wlr-which-key with niri to easily move windows, workspaces, monitors and focus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This requires wlr-which-key version >= 1.2.0 available in NixOS unstable | |
# TODO: Outputs eDP-1, DP-4 and DP-6 are hard-coded to my home setup | |
# TODO: the number of workspaces is hard coded | |
font: JetBrainsMono Nerd Font 22 | |
menu: | |
- key: "f" | |
desc: focus | |
submenu: | |
- key: "m" | |
desc: monitor | |
submenu: | |
- key: "h" | |
desc: left | |
cmd: niri msg action focus-monitor-left | |
- key: "j" | |
desc: down | |
cmd: niri msg action focus-monitor-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action focus-monitor-up | |
- key: "l" | |
desc: right | |
cmd: niri msg action focus-monitor-right | |
- key: "p" | |
desc: previous | |
cmd: niri msg action focus-monitor-previous | |
- key: "n" | |
desc: next | |
cmd: niri msg action focus-monitor-next | |
- key: "1" | |
desc: 1 | |
cmd: niri msg action focus-monitor DP-6 | |
- key: "2" | |
desc: 2 | |
cmd: niri msg action focus-monitor DP-4 | |
- key: "3" | |
desc: 3 | |
cmd: niri msg action focus-monitor eDP-1 | |
- key: "w" | |
desc: window | |
submenu: | |
- key: "j" | |
desc: down | |
cmd: niri msg action focus-window-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action focus-window-up | |
- key: "p" | |
desc: previous | |
cmd: niri msg action focus-window-previous | |
- key: "W" | |
desc: workspace | |
submenu: | |
- key: "j" | |
desc: down | |
cmd: niri msg action focus-workspace-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action focus-workspace-up | |
- key: "p" | |
desc: previous | |
cmd: niri msg action focus-workspace-previous | |
- key: "1" | |
desc: 1 | |
cmd: niri msg action focus-workspace 1 | |
- key: "2" | |
desc: 2 | |
cmd: niri msg action focus-workspace 2 | |
- key: "3" | |
desc: 3 | |
cmd: niri msg action focus-workspace 3 | |
- key: "w" | |
desc: move window | |
submenu: | |
- key: "m" | |
desc: to monitor | |
submenu: | |
- key: "h" | |
desc: left | |
cmd: niri msg action move-window-to-monitor-left | |
- key: "j" | |
desc: down | |
cmd: niri msg action move-window-to-monitor-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action move-window-to-monitor-up | |
- key: "l" | |
desc: right | |
cmd: niri msg action move-window-to-monitor-right | |
- key: "p" | |
desc: previous | |
cmd: niri msg action move-window-to-monitor-previous | |
- key: "n" | |
desc: next | |
cmd: niri msg action move-window-to-monitor-next | |
- key: "1" | |
desc: next | |
cmd: niri msg action move-window-to-monitor DP-6 | |
- key: "2" | |
desc: next | |
cmd: niri msg action move-window-to-monitor DP-4 | |
- key: "3" | |
desc: next | |
cmd: niri msg action move-window-to-monitor eDP-1 | |
- key: "w" | |
desc: to workspace | |
submenu: | |
- key: "j" | |
desc: down | |
cmd: niri msg action move-window-to-workspace-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action move-window-to-workspace-up | |
- key: "1" | |
desc: 1 | |
cmd: niri msg action move-window-to-workspace 1 | |
- key: "2" | |
desc: 2 | |
cmd: niri msg action move-window-to-workspace 2 | |
- key: "3" | |
desc: 3 | |
cmd: niri msg action move-window-to-workspace 3 | |
- key: "4" | |
desc: 4 | |
cmd: niri msg action move-window-to-workspace 4 | |
- key: "5" | |
desc: 5 | |
cmd: niri msg action move-window-to-workspace 5 | |
- key: "W" | |
desc: move workspace | |
submenu: | |
- key: "j" | |
desc: down | |
cmd: niri msg action move-workspace-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action move-workspace-up | |
- key: "1" | |
desc: 1 | |
cmd: niri msg action move-workspace-to-index 1 | |
- key: "2" | |
desc: 2 | |
cmd: niri msg action move-workspace-to-index 2 | |
- key: "3" | |
desc: 3 | |
cmd: niri msg action move-workspace-to-index 3 | |
- key: "4" | |
desc: 4 | |
cmd: niri msg action move-workspace-to-index 4 | |
- key: "5" | |
desc: 5 | |
cmd: niri msg action move-workspace-to-index 5 | |
- key: "m" | |
desc: to monitor | |
submenu: | |
- key: "h" | |
desc: left | |
cmd: niri msg action move-workspace-to-monitor-left | |
- key: "j" | |
desc: down | |
cmd: niri msg action move-workspace-to-monitor-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action move-workspace-to-monitor-up | |
- key: "l" | |
desc: right | |
cmd: niri msg action move-workspace-to-monitor-right | |
- key: "p" | |
desc: previous | |
cmd: niri msg action move-workspace-to-monitor-previous | |
- key: "n" | |
desc: next | |
cmd: niri msg action move-workspace-to-monitor-next | |
- key: "1" | |
desc: next | |
cmd: niri msg action move-workspace-to-monitor DP-6 | |
- key: "2" | |
desc: next | |
cmd: niri msg action move-workspace-to-monitor DP-4 | |
- key: "3" | |
desc: next | |
cmd: niri msg action move-workspace-to-monitor eDP-1 | |
- key: "c" | |
desc: move column | |
submenu: | |
- key: "h" | |
desc: "left" | |
cmd: niri msg action move-column-left | |
- key: "l" | |
desc: "right" | |
cmd: niri msg action move-column-right | |
- key: "<" | |
desc: "first" | |
cmd: niri msg action move-column-to-first | |
- key: ">" | |
desc: "last" | |
cmd: niri msg action move-column-to-last | |
- key: "H" | |
desc: "left or monitor left" | |
cmd: niri msg action move-column-left-or-to-monitor-left | |
- key: "L" | |
desc: "right or monitor right" | |
cmd: niri msg action move-column-right-or-to-monitor-right | |
- key: "m" | |
desc: to monitor | |
submenu: | |
- key: "h" | |
desc: left | |
cmd: niri msg action move-column-to-monitor-left | |
- key: "j" | |
desc: down | |
cmd: niri msg action move-column-to-monitor-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action move-column-to-monitor-up | |
- key: "l" | |
desc: right | |
cmd: niri msg action move-column-to-monitor-right | |
- key: "p" | |
desc: previous | |
cmd: niri msg action move-column-to-monitor-previous | |
- key: "n" | |
desc: next | |
cmd: niri msg action move-column-to-monitor-next | |
- key: "1" | |
desc: next | |
cmd: niri msg action move-column-to-monitor DP-6 | |
- key: "2" | |
desc: next | |
cmd: niri msg action move-column-to-monitor DP-4 | |
- key: "3" | |
desc: next | |
cmd: niri msg action move-column-to-monitor eDP-1 | |
- key: "w" | |
desc: to workspace | |
submenu: | |
- key: "j" | |
desc: down | |
cmd: niri msg action move-column-to-workspace-down | |
- key: "k" | |
desc: up | |
cmd: niri msg action move-column-to-workspace-up | |
- key: "1" | |
desc: 1 | |
cmd: niri msg action move-column-to-workspace 1 | |
- key: "2" | |
desc: 2 | |
cmd: niri msg action move-column-to-workspace 2 | |
- key: "3" | |
desc: 3 | |
cmd: niri msg action move-column-to-workspace 3 | |
- key: "4" | |
desc: 4 | |
cmd: niri msg action move-column-to-workspace 4 | |
- key: "5" | |
desc: 5 | |
cmd: niri msg action move-column-to-workspace 5 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment