Files
komorebi/Cargo.toml
T
LGUG2Z 0520068b48 feat(hotkeys): the binding IR, key names to Qt codes and a fixture corpus
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.
2026-10-28 07:20:57 -07:00

44 lines
1.2 KiB
TOML

[workspace]
resolver = "2"
members = [
"komorebi",
"komorebi-client",
"komorebi-hotkeys",
"komorebic",
"version",
]
[workspace.package]
version = "0.1.0"
[workspace.dependencies]
# upstream's layouts, at a revision that has the fix for resizing a tile by dragging its edge
# (LGUG2Z/komorebi#1765) and the placement helpers komorebi for KDE uses
komorebi-layouts = { git = "https://github.com/LGUG2Z/komorebi", rev = "f08aa55511d77ca56ab0e789efabeb0a237a463e", features = [
"schemars",
] }
# the themes (and the palettes made from pictures), from the same upstream revision
komorebi-themes = { git = "https://github.com/LGUG2Z/komorebi", rev = "f08aa55511d77ca56ab0e789efabeb0a237a463e" }
chrono = "0.4"
clap = { version = "4", features = ["derive", "wrap_help"] }
color-eyre = "0.6"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
dirs = "6"
hotwatch = "0.5"
lazy_static = "1"
pastey = "0.2"
schemars = "1.1"
serde = { version = "1", features = ["derive"] }
serde_json = { package = "serde_json_lenient", version = "0.2" }
shadow-rs = "1"
sysinfo = "0.38"
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[workspace.metadata.crane]
name = "komorebi-workspace"