Giter VIP home page Giter VIP logo

swhkd's Introduction

SWHKD

A next-generation hotkey daemon for Wayland/X11 written in Rust.

SWHKD

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.

Installation and Building

Installation and building instructions can be found here.

Running

swhks &
pkexec swhkd

Runtime signals

After opening swhkd, you can control the program through signals:

  • sudo pkill -USR1 swhkd — Pause key checking
  • sudo pkill -USR2 swhkd — Resume key checking
  • sudo pkill -HUP swhkd — Reload config file

Configuration

swhkd 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 and modifier names are listed in man 5 swhkd-keys.

Autostart

To autostart swhkd you can do one of two things

  1. Add the commands from the "Running" section to your window managers configuration file.
  2. 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.

Security

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 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!

Support

  1. https://matrix.to/#/#waycrate-tools:matrix.org
  2. https://discord.gg/KKZRDYrRYW

Contributors

Supporters:

  1. @CluelessTechnologist

swhkd's People

Contributors

shinyzenith avatar angelofallars avatar edenqwq avatar ajanon avatar rv178 avatar unsignedarduino avatar truenaho avatar vainiovano avatar actualdankcoder avatar ttwno avatar innocentzero avatar lavafroth avatar newtoallofthis123 avatar epetousis avatar mendess avatar dependabot[bot] avatar tusharxoxoxo avatar tsankuanglee avatar thelastzombie avatar slidinghorn avatar murlakatamenka avatar samsonnagamani avatar aadilshabier avatar michael-gallo avatar loiccoyle avatar eskpil avatar ivandimitrov8080 avatar freddylist avatar hipeople68 avatar concurrentcrab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.