From 5cd8449c399c939f0632a7346ec3f4e9cd3a4f08 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Sat, 8 Oct 2022 16:28:27 +0200 Subject: Conditionally swap Escape and Caps. --- xinit.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xinit.sh') diff --git a/xinit.sh b/xinit.sh index d1e3ae9..349cc5b 100755 --- a/xinit.sh +++ b/xinit.sh @@ -4,11 +4,16 @@ xrdb ~/.Xresources pgrep -x picom || picom -b pgrep -x dunst || dunst & -#setxkbmap -layout es -option caps:swapescape -setxkbmap -layout es xset -b pgrep -x unclutter || unclutter --idle 1 & #touchpad.sh initialLayout.sh setRandomWP.sh pgrep -x sxhkd || sxhkd >~/logs/sxhkd.log & + +# Swap Escape and Caps except Kyria keyboard is connected +if lsusb | grep -Fq 'Kyria'; then + setxkbmap -layout es +else + setxkbmap -layout es -option caps:swapescape +fi -- cgit v1.2.1