From 777607fa3713128cf2249cf73720e4e4ebc4e716 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Fri, 28 Aug 2026 15:05:07 +0200 Subject: [PATCH] Set up `xcape` ... ... to enable us to use Caps Lock as another Excape key --- .config/systemd/user/xcape.service | 12 ++++++++++++ .local/bin/dotfiles-install | 1 + 2 files changed, 13 insertions(+) create mode 100644 .config/systemd/user/xcape.service diff --git a/.config/systemd/user/xcape.service b/.config/systemd/user/xcape.service new file mode 100644 index 0000000..41a6864 --- /dev/null +++ b/.config/systemd/user/xcape.service @@ -0,0 +1,12 @@ +[Unit] +# Works together with "xkb-options" in ~/.config/gnome-settings/misc.ini +Description=Tap Caps Lock (acting as Control) to send Escape +ConditionEnvironment=XDG_SESSION_TYPE=x11 +ConditionPathExists=/usr/bin/xcape + +[Service] +Type=forking +ExecStart=/usr/bin/xcape -e 'Caps_Lock=Escape' + +[Install] +WantedBy=graphical-session.target diff --git a/.local/bin/dotfiles-install b/.local/bin/dotfiles-install index 924f790..f9ce1ba 100755 --- a/.local/bin/dotfiles-install +++ b/.local/bin/dotfiles-install @@ -176,6 +176,7 @@ fi if systemctl --user daemon-reload 2>/dev/null; then systemctl --user enable gnome-restore.service systemctl --user enable night-light-reset.timer + systemctl --user enable xcape.service else echo "WARN: no systemd user session, units not enabled" >&2 fi