11 lines
307 B
Bash
Executable File
11 lines
307 B
Bash
Executable File
#!/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"
|