From bf05a40200f4a002b8db783d1b878b397a6d60b2 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Fri, 7 Jun 2024 12:46:02 +0200 Subject: [PATCH] Run xcape only within X11 --- .config/shell/init.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/shell/init.sh b/.config/shell/init.sh index 9758081..5b6e6ab 100644 --- a/.config/shell/init.sh +++ b/.config/shell/init.sh @@ -37,8 +37,10 @@ _in_wayland () { # Configure the keyboard: # - make right alt the compose key, e.g., for German Umlauts # - make caps lock a ctrl modifier and Esc key -_in_x11 && setxkbmap us -option 'compose:ralt,caps:ctrl_modifier,lv3:menu_switch' -_command_exists xcape && xcape -e "Caps_Lock=Escape" +if _in_x11; then + setxkbmap us -option 'compose:ralt,caps:ctrl_modifier,lv3:menu_switch' + _command_exists xcape && xcape -e "Caps_Lock=Escape" +fi # Load shell utilities and create aliases