toyotacorolla

vroom
Log | Files | Refs

keyboardlayouts (364B)


      1 #!/bin/sh
      2 
      3 # Get the current keyboard layout
      4 layout=$(setxkbmap -query | grep layout | awk '{print $2}')
      5 
      6 if [ $layout == "ru" ]; then
      7 	setxkbmap -layout us -variant colemak
      8 	herbe "current layout: colemak"
      9 	exit 0
     10 elif [ $layout == "us" ]; then
     11 	setxkbmap -layout ru
     12 	herbe "current layout: russian"
     13 	exit 0
     14 else
     15 	setxkbmap -layout us -variant colemak
     16 	exit 1
     17 fi