mirror of https://github.com/tiyn/dotfiles
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.
15 lines
725 B
15 lines
725 B
10 months ago
|
#!/bin/sh
|
||
|
layout=$(setxkbmap -query | grep "layout" | awk '{print $NF}') #| grep -q 'ru$' && $(setxkbmap de ; notify-send -u low 'SXHKD' 'Set keymap to german') || $(setxkbmap de ru ; notify-send -u low 'SXHKD' 'Set keymap to russian')
|
||
|
variant=$(setxkbmap -query | grep "variant" | awk '{print $NF}')
|
||
|
echo $variant
|
||
|
if [ "$layout" = "de" -a "$variant" = "nodeadkeys" ]
|
||
|
then
|
||
|
setxkbmap de && notify-send -u low 'SXHKD' 'Set keymap to german'
|
||
|
elif [ "$layout" = "de" -a "$variant" = "" ]
|
||
|
then
|
||
|
setxkbmap de ru && notify-send -u low 'SXHKD' 'Set keymap to russian (german)'
|
||
|
elif [ "$layout" = "de" -a "$variant" = "ru" ]
|
||
|
then
|
||
|
setxkbmap de nodeadkeys && notify-send -u low 'SXHKD' 'Set keymap to german (nodeadkeys)'
|
||
|
fi
|