2
0
Fork
You've already forked lefthk
0
LeftHK - A hotkey daemon written in Rust
  • Rust 98.2%
  • Nix 1.8%
2022年12月18日 10:54:04 +00:00
.github/workflows Change to main 2022年09月11日 12:24:43 +01:00
lefthk make clippy (pedantic) happy ( #32 ) 2022年12月18日 10:54:04 +00:00
lefthk-core make clippy (pedantic) happy ( #32 ) 2022年12月18日 10:54:04 +00:00
.gitignore Ignoring toggletasks.json ( #20 ) 2022年09月11日 12:07:43 +01:00
Cargo.lock fix build of lefthk binary breaking due to unhandled error type ( #31 ) 2022年12月14日 15:54:49 +01:00
Cargo.toml Librification (this is far from a word) ( #8 ) 2021年12月06日 17:45:49 +00:00
flake.lock Added basic flake ( #24 ) 2022年09月28日 13:08:03 +01:00
flake.nix Added basic flake ( #24 ) 2022年09月28日 13:08:03 +01:00
LICENSE Create LICENSE 2021年10月25日 12:04:26 +01:00
README.md Ron ( #18 ) 2022年09月06日 12:26:28 +01:00

LeftHK

LeftHK - A hotkey daemon written in Rust

THIS IS BETA SOFTWARE

The configuration file should be created in ~/.config/lefthk/ and called config.ron. If the configuration file is not created the program will exit. Example config:

Config(
 keybinds: [
 Keybind(
 command: Execute("st -e htop"),
 modifier: ["Mod4", "Shift"],
 key: Key("x"),
 ),
 Keybind(
 command: Executes(["st -e htop", "st -e bpytop"]),
 modifier: ["Mod4", "Shift"],
 key: Keys(["x", "m"]),
 ),
 Keybind(
 command: Chord([
 Keybind(
 command: Execute("st -e htop"),
 modifier: ["Mod4"],
 key: Key("c"),
 ),
 ]),
 modifier: ["Mod4"],
 key: Key("c"),
 ),
 ]
)

Reload, Kill, Chord, and ExitChord are the only internal commands. To run a normal command you need to call Execute or Executes, with the added value or values of the command. A chord can accept any amount and type of extra keybinds, which when started blocks previous keybinds and will exit once a sub-keybind is executed. A Chord will take the ExitChord set within it first, then if not set it will take the ExitChord from its parent (e.g. a Chord within a Chord will take the ExitChord from the previous Chord). There is a pipe which receives commands through $XDG_RUNTIME_DIR/lefthk/commands.pipe, currently only accepts Reload and Kill.