added language switch
This commit is contained in:
parent
ecaade6541
commit
6f55fa414d
10
scripts/switch-lang
Executable file
10
scripts/switch-lang
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LAYOUT_OLD=$(setxkbmap -query | grep layout | cut -d ':' -f 2)
|
||||||
|
LAYOUT_NEW=$(grep -A 1 $LAYOUT_OLD $HOME/.config/keyboard_layout | tail -n1)
|
||||||
|
if [ "$LAYOUT_NEW" = "END" ]
|
||||||
|
then
|
||||||
|
LAYOUT_NEW=$(head -n1 $HOME/.config/keyboard_layout)
|
||||||
|
fi
|
||||||
|
setxkbmap $LAYOUT_NEW
|
||||||
|
notify-send "New Layout $LAYOUT_NEW set"
|
Loading…
x
Reference in New Issue
Block a user