diff --git a/sxhkdrc b/sxhkdrc index 9981385..5ac590a 100644 --- a/sxhkdrc +++ b/sxhkdrc @@ -10,6 +10,10 @@ #super + @space # dmenu_run +# toggle keyboard layout +super + BackSpace + ~/.config/sxhkd/toggle-gb-ru-kb.sh + # mouse scroll down super + Down xte 'mouseclick 5' diff --git a/toggle-gb-ru-kb.sh b/toggle-gb-ru-kb.sh new file mode 100755 index 0000000..647fa56 --- /dev/null +++ b/toggle-gb-ru-kb.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +LAYOUT=$(setxkbmap -query | grep layout | grep -oP "gb|ru") +if [ $LAYOUT = 'gb' ] ; then + setxkbmap ru +else + setxkbmap gb +fi