Run xcape only within X11

This commit is contained in:
Alexander Hess 2024-06-07 12:46:02 +02:00
parent 996081a247
commit bf05a40200
Signed by: alexander
GPG key ID: 344EA5AB10D868E0

View file

@ -37,8 +37,10 @@ _in_wayland () {
# Configure the keyboard: # Configure the keyboard:
# - make right alt the compose key, e.g., for German Umlauts # - make right alt the compose key, e.g., for German Umlauts
# - make caps lock a ctrl modifier and Esc key # - make caps lock a ctrl modifier and Esc key
_in_x11 && setxkbmap us -option 'compose:ralt,caps:ctrl_modifier,lv3:menu_switch' if _in_x11; then
setxkbmap us -option 'compose:ralt,caps:ctrl_modifier,lv3:menu_switch'
_command_exists xcape && xcape -e "Caps_Lock=Escape" _command_exists xcape && xcape -e "Caps_Lock=Escape"
fi
# Load shell utilities and create aliases # Load shell utilities and create aliases