Pi66

pind
Simple Rust hotkey daemon.
git clone https://git.pi66.xyz/pind

Pind

About

When I switched from X11 to Wayland, I ran into problems with hotkey binding apps like sxhkd. I tried swhkd, but it wasn’t good enough.
After testing Waybind, I decided to build my own minimal hotkey daemon in Rust: Pind.

Features

Installation

⚠️ Warning: Run without sudo.

1
2
3
4
5
6
7
make install
````

Uninstall:

```bash
make uninstall

Usage

Run:

1
pindc <doas|sudo|etc>

To restart, just run the command again (it kills the old process).

Config

The config file is located at:

1
~/.config/pind/pindrc

Config Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Ctrl + Shift + Up
ctrl + shift + up => light -A 10 ; notify-send "Light" "Light Up %$(light)"

# Ctrl + Shift + Down
ctrl_left + shift + down => doas light -U 10 ; notify-send "Light" "Light Down %$(light)"

# Meta + a
meta_right + a => set file (ls ~/learn/book | wmenu); and test -n "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mi>f</mi><mi>i</mi><mi>l</mi><mi>e</mi><mi>"</mi><mi>;</mi><mi>a</mi><mi>n</mi><mi>d</mi><mi>z</mi><mi>a</mi><mi>t</mi><mi>h</mi><mi>u</mi><mi>r</mi><mi>a</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mi>l</mi><mi>e</mi><mi>a</mi><mi>r</mi><mi>n</mi><mo>&#x0002F;</mo><mi>b</mi><mi>o</mi><mi>o</mi><mi>k</mi><mo>&#x0002F;</mo><mi>"</mi></mrow></math>file"

# Volume Up
ctrl_left + shift_right + right => pactl set-sink-volume @DEFAULT_SINK@ +10% ; notify-send "Sound" "Volume Up %$(pamixer --get-volume)"

# Volume Down
ctrl + shift + left => pactl set-sink-volume @DEFAULT_SINK@ -10% ; notify-send "Sound" "Volume Down %$(pamixer --get-volume)"

Key Symbol Table

Key Symbol(s)
Ctrl Left ctrl, ctrl_left
Ctrl Right ctrl_right
Shift Left shift, shift_left
Shift Right shift_right
Alt Left alt, alt_left
Alt Right alt_right
Meta Left meta, meta_left
Meta Right meta_right
CapsLock capslock
Tab tab
Enter enter, return
Esc esc
Space space
Up up
Down down
Left left
Right right
Backslash , back_slash
Slash /, slash
Dot ., dot
Comma ,, comma
Semicolon ;, semicolon
Apostrophe ', apostrophe
Left Brace [, leftbrace
Right Brace ], rightbrace
Minus -, minus
Equal =, equal
Grave `, grave
NumLock numlock
ScrollLock scroll_lock
0–9 0,1,2,...,9
A–Z a–z
F1–F12 f1–f12
KP0–KP9 kp0–kp9, keypad_0–9
KP Dot kpdot, keypad_dot
KP Minus kpminus, keypad_minus

How it Works

There are two executables: