Crates.io | Simple-Wayland-HotKey-Daemon |
lib.rs | Simple-Wayland-HotKey-Daemon |
version | 1.2.0 |
source | src |
created_at | 2022-03-06 14:10:48.053036 |
updated_at | 2022-05-11 09:23:07.106809 |
description | Sxhkd clone for Wayland (works on TYY and X11 too) |
homepage | |
repository | https://git.sr.ht/~shinyzenith/swhkd |
max_upload_size | |
id | 544504 |
size | 129,198 |
A next-generation hotkey daemon for Wayland/X11 written in Rust.
Simple Wayland HotKey Daemon
swhkd is a display protocol-independent hotkey daemon made in Rust. swhkd uses an easy-to-use configuration system inspired by sxhkd so you can easily add or remove hotkeys.
It also attempts to be a drop-in replacement for sxhkd, meaning, your sxhkd config file is also compatible with swhkd.
Because swhkd can be used anywhere, the same swhkd config can be used across Xorg or Wayland desktops, and you can even use swhkd in a tty.
See INSTALL.md for installing swhkd.
Note: swhks
is not a typo, it is the server process of the program.
swhks &
pkexec swhkd
After opening swhkd, you can control the program through signals:
sudo pkill -USR1 swhkd
- Pause key checkingsudo pkill -USR2 swhkd
- Resume key checkingsudo pkill -HUP swhkd
- Reload config fileSwhkd closely follows sxhkd syntax, so most existing sxhkd configs should be functional with swhkd.
The default configuration file is in /etc/swhkd/swhkdrc
. If you don't like having to edit the file as root every single time, you can create a symlink from ~/.config/swhkd/swhkdrc
to /etc/swhkd/swhkdrc
.
If you use Vim, you can get swhkd config syntax highlighting with the
swhkd-vim plugin. Install it in
vim-plug with Plug 'waycrate/swhkd-vim'
.
All supported key names are listed in the following file.
We use a server-client model to keep you safe. The daemon ( swhkd - privileged process ) communicates to the server ( swhks - running as non root user ) after checking for valid keybinds. 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!