mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-17 23:37:47 +02:00
sxhkd: improved keymap key
This commit is contained in:
parent
032b94333e
commit
e655afde55
@ -30,7 +30,7 @@ super + backslash
|
|||||||
sound_toggle
|
sound_toggle
|
||||||
|
|
||||||
super + shift + l
|
super + shift + l
|
||||||
setxkbmap -query | 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')
|
change_keymap
|
||||||
|
|
||||||
super + shift + r
|
super + shift + r
|
||||||
pkill -usr1 -x sxhkd ; notify-send -u low 'SXHKD' 'Reloaded config'
|
pkill -usr1 -x sxhkd ; notify-send -u low 'SXHKD' 'Reloaded config'
|
||||||
|
14
.local/bin/tools/change_keymap
Executable file
14
.local/bin/tools/change_keymap
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/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
|
Loading…
x
Reference in New Issue
Block a user