A next-generation hotkey daemon for Wayland/X11 written in Rust.
Simple Wayland HotKey Daemon Polkit
Originally forked from swhkd, deattached from the original repo due to the desire to keep the Polkit security model and improve repo discoverability.
swhkdp
is a display protocol-independent hotkey daemon made in
Rust. swhkdp
uses an easy-to-use configuration
system inspired by sxhkd
, so you can easily add or remove hotkeys.
Because swhkdp
can be used anywhere, the same swhkdp
config can be used across
Xorg or Wayland desktops, and you can even use swhkdp
in a TTY.
Installation and building instructions can be found here.
swhks &
pkexec swhkdp
After opening swhkdp
, you can control the program through signals:
sudo pkill -USR1 swhkdp
— Pause key checkingsudo pkill -USR2 swhkdp
— Resume key checkingsudo pkill -HUP swhkdp
— Reload config file
swhkdp
uses configuration files that follows yml or json syntax, detailed
instructions can be found in CONFIGURATION.md
The default configuration file is in /etc/swhkdp/swhkdp.yml
. If you don't like
having to edit the file as root every single time, you can create a symlink from
~/.config/swhkdp/swhkdp.yml
to /etc/swhkdp/swhkdp.yml
.
Not sure what key to use, launch swhkdp with -d option and press needed key,
it will be shown in logs as DEBUG swhkdp] Key: KEY_C
- Add the commands from the "Running" section to your window managers configuration file.
- Enable the service file for your respective init system. Currently, only systemd and OpenRC service files exist and more will be added soon including Runit.
We use a server-client model to keep you safe. The daemon (swhkdp
— privileged
process) communicates to the server (swhks
— running as non-root user) after
checking for valid keybindings. Since the daemon is totally separate from the
server, no other process can read your keystrokes. As for shell commands, you
might be thinking that any program can send shell commands to the server and
that's true! But the server runs the commands as the currently logged-in user,
so no extra permissions are provided (This is essentially the same as any app on
your desktop calling shell commands).
So yes, you're safe!
- Shinyzenith
- Angelo Fallaria
- EdenQwQ