mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-04 22:16:32 +01:00
komorebi users keep their bindings to komorebic in the file of a hotkey daemon: an skhdrc on macOS, a whkdrc on Windows, an sxhkdrc on X11. On KDE Plasma the program that runs a command on a key is KDE's global shortcut daemon, so the bindings have to be read and turned into shortcuts. This adds `komorebi-hotkeys`, a crate of its own that does not depend on the daemon, with the model all three formats are read into: a `Keymap` of modes of bindings, each a chord, an edge and a body (a command, a mode switch, or one action per application), and `Diagnostic`s with spans. A key is a Qt key code with the modifier flags or'ed in, which is what kglobalacceld stores, so the same key is the same value whatever file named it. `qt::key_to_qt` knows the three vocabularies: skhd's literals and macOS keycodes, whkd's virtual key names and sxhkd's X keysyms, including the XF86 media keys. `Combo` applies the shifted symbol rule measured on KWin 6.8.1 (Alt+Shift+1 arrives as Alt+!), and its fields are private so that no combo skips it; a `compile_fail` example proves it. Positions are read as on a US layout. The fixture corpus writes each case in every format that can express it; the parsers are written against it. The flake's source filter keeps the fixtures, so that the nix checks can read them.
12 lines
433 B
Plaintext
12 lines
433 B
Plaintext
# every modifier, and Shift on a key that types a symbol
|
|
.shell pwsh
|
|
|
|
win + return : konsole
|
|
ctrl + alt + left : komorebic stack left
|
|
alt + shift + h : komorebic move left
|
|
ctrl + shift + right : komorebic resize-edge right increase
|
|
alt + shift + 1 : komorebic move-to-workspace 0
|
|
ctrl + alt + shift + 9 : komorebic move-to-workspace 8
|
|
win + ctrl + alt + shift + a : komorebic retile
|
|
ctrl + alt + shift + m : komorebic toggle-monocle
|