From ffc9c5a64a13eb184d141b2e3fa02f0a54e3aaac Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 15 Jun 2023 00:44:07 +0200 Subject: [PATCH 01/11] style(readme): wrap text at 80 characters --- README.md | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 28cb18e..6102a95 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,15 @@ **S**imple **W**ayland **H**ot**K**ey **D**aemon -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. +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. +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. +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: @@ -43,9 +47,12 @@ After opening swhkd, you can control the program through signals: ## Configuration: -Swhkd closely follows sxhkd syntax, so most existing sxhkd configs should be functional with swhkd. +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`. +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](https://github.com/waycrate/swhkd-vim) plugin. Install it in @@ -57,12 +64,24 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`. ### To autostart swhkd you can do one of two things: -1. Add the commands from the ["Running" section](https://github.com/waycrate/swhkd#running) to your window managers configuration file. -1. Enable the [service file](https://github.com/waycrate/swhkd/tree/main/contrib/init) for your respective init system. Currently only systemd and OpenRC service files exist and more will be added soon including Runit. +1. Add the commands from the ["Running" + section](https://github.com/waycrate/swhkd#running) to your window managers + configuration file. +1. Enable the [service + file](https://github.com/waycrate/swhkd/tree/main/contrib/init) 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 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 ). +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! From 3d29204dc3545c25bdacc80803576cd83ab3f766 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 15 Jun 2023 00:47:23 +0200 Subject: [PATCH 02/11] docs(readme): apply code formatting to tool names --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6102a95..4733dd3 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ **S**imple **W**ayland **H**ot**K**ey **D**aemon -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. +`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. +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. +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: @@ -39,7 +39,7 @@ pkexec swhkd ## Runtime signals: -After opening swhkd, you can control the program through 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 @@ -47,14 +47,14 @@ After opening swhkd, you can control the program through signals: ## Configuration: -Swhkd closely follows sxhkd syntax, so most existing sxhkd configs should be -functional with swhkd. +`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 +If you use Vim, you can get `swhkd` config syntax highlighting with the [swhkd-vim](https://github.com/waycrate/swhkd-vim) plugin. Install it in vim-plug with `Plug 'waycrate/swhkd-vim'`. @@ -62,7 +62,7 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`. ## Autostart: -### To autostart swhkd you can do one of two things: +### To autostart `swhkd` you can do one of two things: 1. Add the commands from the ["Running" section](https://github.com/waycrate/swhkd#running) to your window managers @@ -74,7 +74,7 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`. ## Security: -We use a server-client model to keep you safe. The daemon ( swhkd - privileged +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 From 4591a0d91c3fadeb0b573df72ef7b3139f122d26 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 15 Jun 2023 00:50:01 +0200 Subject: [PATCH 03/11] docs(readme): add hyperlinks to Go references --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4733dd3..c3e811e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

SWHKD -

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

+

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

@@ -16,9 +16,9 @@ **S**imple **W**ayland **H**ot**K**ey **D**aemon -`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. +`swhkd` is a display protocol-independent hotkey daemon made in +[Rust](https://www.rust-lang.org). `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`. From 77b61a68b3eda4c82cfc878d5b55525ea16fe822 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 15 Jun 2023 00:56:59 +0200 Subject: [PATCH 04/11] docs(readme): simplify header notation --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c3e811e..6742cd5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@

-## SWHKD: +## SWHKD **S**imple **W**ayland **H**ot**K**ey **D**aemon @@ -26,18 +26,18 @@ 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 [Installation and building instructions can be found here.](./INSTALL.md) -## Running: +## Running ```bash swhks & pkexec swhkd ``` -## Runtime signals: +## Runtime signals After opening `swhkd`, you can control the program through signals: @@ -45,7 +45,7 @@ After opening `swhkd`, you can control the program through signals: - `sudo pkill -USR2 swhkd` - Resume key checking - `sudo pkill -HUP swhkd` - Reload config file -## Configuration: +## Configuration `swhkd` closely follows `sxhkd` syntax, so most existing `sxhkd` configs should be functional with `swhkd`. @@ -60,9 +60,9 @@ vim-plug with `Plug 'waycrate/swhkd-vim'`. All supported key and modifier names are listed in `man 5 swhkd-keys`. -## Autostart: +## Autostart -### To autostart `swhkd` you can do one of two things: +### To autostart `swhkd` you can do one of two things 1. Add the commands from the ["Running" section](https://github.com/waycrate/swhkd#running) to your window managers @@ -72,7 +72,7 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`. respective init system. Currently only systemd and OpenRC service files exist and more will be added soon including Runit. -## Security: +## 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 @@ -85,12 +85,12 @@ your desktop calling shell commands ). So yes, you're safe! -## Support: +## Support 1. https://matrix.to/#/#waycrate-tools:matrix.org 1. https://discord.gg/KKZRDYrRYW -## Contributors: +## Contributors From 8377aaf92a3516c1e12741b0436346989681e0b6 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 15 Jun 2023 00:56:08 +0200 Subject: [PATCH 05/11] docs(readme): fix writing --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6742cd5..834b35c 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ `swhkd` is a display protocol-independent hotkey daemon made in [Rust](https://www.rust-lang.org). `swhkd` uses an easy-to-use configuration -system inspired by `sxhkd` so you can easily add or remove hotkeys. +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. +Xorg or Wayland desktops, and you can even use `swhkd` in a TTY. ## Installation and Building @@ -41,9 +41,9 @@ pkexec swhkd 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 +- `sudo pkill -USR1 swhkd` — Pause key checking +- `sudo pkill -USR2 swhkd` — Resume key checking +- `sudo pkill -HUP swhkd` — Reload config file ## Configuration @@ -69,19 +69,19 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`. configuration file. 1. Enable the [service file](https://github.com/waycrate/swhkd/tree/main/contrib/init) for your - respective init system. Currently only systemd and OpenRC service files exist - and more will be added soon including Runit. + 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 keybinds. Since the daemon is totally separate from the +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 ). +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! From 252f5ecb0b95b1be387e106cbd19dc05058181f5 Mon Sep 17 00:00:00 2001 From: Freddy List Date: Tue, 31 Jan 2023 16:43:44 +0100 Subject: [PATCH 06/11] [fix] Incorrect man page installation --- CHANGELOG.md | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8af034..f227994 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,3 +26,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Mouse cursors and other devices are no longer blocked when running `swhkd`. - Option prefixes on modifiers are now properly parsed. e.g., `~control` is now understood by `swhkd` as the `control` modifier with an option +- Install mandocs in the correct locations. diff --git a/Makefile b/Makefile index 538071d..b1227ad 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ install: @find ./docs -type f -iname "*.1.gz" \ -exec install -Dm 644 {} -t $(DESTDIR)/$(MAN1_DIR) \; @find ./docs -type f -iname "*.5.gz" \ - -exec install -Dm 644 {} -t $(DESTDIR)/$(MAN1_DIR) \; + -exec install -Dm 644 {} -t $(DESTDIR)/$(MAN5_DIR) \; @install -Dm 755 ./target/release/$(DAEMON_BINARY) -t $(DESTDIR)/$(TARGET_DIR) @install -Dm 755 ./target/release/$(SERVER_BINARY) -t $(DESTDIR)/$(TARGET_DIR) @install -Dm 644 -o root ./$(POLKIT_POLICY_FILE) -t $(DESTDIR)/$(POLKIT_DIR) From 0848310ac0b6f35e907e804f5b487805de60a8ca Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sun, 18 Jun 2023 03:05:59 +0200 Subject: [PATCH 07/11] [docs] correct capitalization of Rust programming language --- docs/swhkd-keys.5.scd | 2 +- docs/swhkd.1.scd | 2 +- docs/swhkd.5.scd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/swhkd-keys.5.scd b/docs/swhkd-keys.5.scd index a5e0370..18abdfe 100644 --- a/docs/swhkd-keys.5.scd +++ b/docs/swhkd-keys.5.scd @@ -2,7 +2,7 @@ swhkd(5) "github.com/waycrate/swhkd" "File Formats Manual" # NAME -swhkd - Hotkey daemon inspired by sxhkd written in rust +swhkd - Hotkey daemon inspired by sxhkd written in Rust # VALID MODIFIERS diff --git a/docs/swhkd.1.scd b/docs/swhkd.1.scd index f83e712..8b3f3dc 100644 --- a/docs/swhkd.1.scd +++ b/docs/swhkd.1.scd @@ -2,7 +2,7 @@ swhkd(1) "github.com/shinyzenith/swhkd" "General Commands Manual" # NAME -swhkd - Hotkey daemon inspired by sxhkd written in rust +swhkd - Hotkey daemon inspired by sxhkd written in Rust # SYNOPSIS diff --git a/docs/swhkd.5.scd b/docs/swhkd.5.scd index 70ea41e..47fc42b 100644 --- a/docs/swhkd.5.scd +++ b/docs/swhkd.5.scd @@ -2,7 +2,7 @@ swhkd(5) "github.com/waycrate/swhkd" "File Formats Manual" # NAME -swhkd - Hotkey daemon inspired by sxhkd written in rust +swhkd - Hotkey daemon inspired by sxhkd written in Rust # CONFIG FILE From 4e10a2b51de24abbf3559e72adb49754184e8538 Mon Sep 17 00:00:00 2001 From: Shinyzenith Date: Fri, 30 Jun 2023 18:47:44 +0530 Subject: [PATCH 08/11] [feat] Introduce nix flake development env Signed-off-by: Shinyzenith --- .gitignore | 1 + flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index 28f615d..e5a7404 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ target *.out com.github.swhkd.pkexec.policy *rc +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..900ef5a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1687977148, + "narHash": "sha256-gUcXiU2GgjYIc65GOIemdBJZ+lkQxuyIh7OkR9j0gCo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "60a783e00517fce85c42c8c53fe0ed05ded5b2a4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0707eff --- /dev/null +++ b/flake.nix @@ -0,0 +1,40 @@ +{ + description = "Swhkd devel"; + + inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; + + outputs = { self, nixpkgs, ... }: + let + pkgsFor = system: + import nixpkgs { + inherit system; + overlays = [ ]; + }; + + targetSystems = [ "aarch64-linux" "x86_64-linux" ]; + in { + devShells = nixpkgs.lib.genAttrs targetSystems (system: + let pkgs = pkgsFor system; + in { + default = pkgs.mkShell { + name = "Swhkd-devel"; + nativeBuildInputs = with pkgs; [ + # Compilers + cargo + rustc + scdoc + + # Tools + zip + rustfmt + clippy + gdb + gnumake + rust-analyzer + strace + valgrind + ]; + }; + }); + }; +} From 0318d82c542c07676e76ad7528cfca2df9b03d5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jun 2023 13:40:38 +0000 Subject: [PATCH 09/11] Bump tokio from 1.23.0 to 1.24.2 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.24.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/commits) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- swhkd/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d41aac..cc6b8b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -620,9 +620,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.23.0" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg", "bytes", diff --git a/swhkd/Cargo.toml b/swhkd/Cargo.toml index 9f31808..9f41c88 100644 --- a/swhkd/Cargo.toml +++ b/swhkd/Cargo.toml @@ -22,7 +22,7 @@ nix = "0.23.1" signal-hook = "0.3.13" signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"] } sysinfo = "0.23.5" -tokio = { version = "1.17.0", features = ["full"] } +tokio = { version = "1.24.2", features = ["full"] } tokio-stream = "0.1.8" [[bin]] From 0602847bc3fde8413baca5c9f2f68333273eb2f8 Mon Sep 17 00:00:00 2001 From: Samson Nagamani Date: Mon, 26 Jun 2023 20:48:57 +0100 Subject: [PATCH 10/11] [feat] Altgr modifier key * Added "Alt graph" or "Alt gr" modifier key. Right alt key will no longer behave like the left alt key. * Modified test to include "Altgr" modifier * Added altgr/mod5 modifier keys to manual Signed-off-by: Samson Nagamani Signed-off-by: Aakash Sen Sharma --- CHANGELOG.md | 2 ++ docs/swhkd-keys.5.scd | 2 ++ swhkd/src/config.rs | 3 +++ swhkd/src/daemon.rs | 2 +- swhkd/src/tests.rs | 8 ++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f227994..9d902b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,11 +15,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `DESTDIR` variable for the `install` target in the `Makefile` to help packaging and installation. To install in a subdirectory, just call `make DESTDIR=subdir install`. +- `Altgr` modifier added (https://github.com/waycrate/swhkd/pull/213). ### Changed - The project `Makefile` now builds the polkit policy file dynamically depending on the target installation directories. +- Alt modifier no longer maps to the right aly key. It only maps to the left alt key. Right alt is referred to as Altgr (alt graph). ### Fixed diff --git a/docs/swhkd-keys.5.scd b/docs/swhkd-keys.5.scd index 18abdfe..76bb849 100644 --- a/docs/swhkd-keys.5.scd +++ b/docs/swhkd-keys.5.scd @@ -12,6 +12,8 @@ swhkd - Hotkey daemon inspired by sxhkd written in Rust - Mod4 - Alt - Mod1 + - Altgr + - Mod5 - Shift # VALID KEYS diff --git a/swhkd/src/config.rs b/swhkd/src/config.rs index 09dd886..a2dac65 100644 --- a/swhkd/src/config.rs +++ b/swhkd/src/config.rs @@ -228,6 +228,7 @@ pub struct Hotkey { pub enum Modifier { Super, Alt, + Altgr, Control, Shift, Any, @@ -452,6 +453,8 @@ pub fn parse_contents(path: PathBuf, contents: String) -> Result, Erro ("mod4", Modifier::Super), ("alt", Modifier::Alt), ("mod1", Modifier::Alt), + ("altgr", Modifier::Altgr), + ("mod5", Modifier::Altgr), ("shift", Modifier::Shift), ("any", Modifier::Any), ]); diff --git a/swhkd/src/daemon.rs b/swhkd/src/daemon.rs index 5fdfc38..74104ea 100644 --- a/swhkd/src/daemon.rs +++ b/swhkd/src/daemon.rs @@ -193,7 +193,7 @@ async fn main() -> Result<(), Box> { (Key::KEY_LEFTMETA, config::Modifier::Super), (Key::KEY_RIGHTMETA, config::Modifier::Super), (Key::KEY_LEFTALT, config::Modifier::Alt), - (Key::KEY_RIGHTALT, config::Modifier::Alt), + (Key::KEY_RIGHTALT, config::Modifier::Altgr), (Key::KEY_LEFTCTRL, config::Modifier::Control), (Key::KEY_RIGHTCTRL, config::Modifier::Control), (Key::KEY_LEFTSHIFT, config::Modifier::Shift), diff --git a/swhkd/src/tests.rs b/swhkd/src/tests.rs index b0785d9..c9c7f3e 100644 --- a/swhkd/src/tests.rs +++ b/swhkd/src/tests.rs @@ -398,6 +398,9 @@ control + 5 alt + 2 notify-send 'Hello world!' +altgr + i + notify-send 'Hello world!' + super + z notify-send 'Hello world!' "; @@ -418,6 +421,11 @@ super + z vec![Modifier::Alt], "notify-send 'Hello world!'".to_string(), ), + Hotkey::new( + evdev::Key::KEY_I, + vec![Modifier::Altgr], + "notify-send 'Hello world!'".to_string(), + ), Hotkey::new( evdev::Key::KEY_Z, vec![Modifier::Super], From ddada68da7feeef26acad47ec4194c6315b4fccb Mon Sep 17 00:00:00 2001 From: Shinyzenith Date: Fri, 30 Jun 2023 19:27:15 +0530 Subject: [PATCH 11/11] [changelog] tokio 1.23.0 -> 1.24.2 Signed-off-by: Shinyzenith --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d902b7..e79be33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The project `Makefile` now builds the polkit policy file dynamically depending on the target installation directories. - Alt modifier no longer maps to the right aly key. It only maps to the left alt key. Right alt is referred to as Altgr (alt graph). +- Tokio version bumped from 1.23.0 to 1.24.2 (https://github.com/waycrate/swhkd/pull/198). ### Fixed