You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
config/i3/scripts/keymap

22 lines
421 B

#!/bin/bash
VAR=$(setxkbmap -query | grep layout | awk '{print toupper($2)}')_$(setxkbmap -query | grep variant | awk '{print $2}')
if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
if [[ "$VAR" == "DE_neo" ]] ; then
setxkbmap de
echo "DE_"
elif [[ "$VAR" == "DE_" ]] ; then
setxkbmap us
echo "US_"
exit 0
elif [[ "$VAR" == "US_" ]] ; then
numlockx off
setxkbmap de neo
echo "DE_neo"
exit 0
fi
fi
echo $VAR