18 lines
385 B
Plaintext
18 lines
385 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
key=`setxkbmap -query | grep "layout\|variant" | awk '{print $2}' | xargs`
|
||
|
|
||
|
if [[ $key = "fr" ]]; then
|
||
|
setxkbmap us
|
||
|
elif [[ $key = "us" ]]; then
|
||
|
setxkbmap us -variant dvorak
|
||
|
elif [[ $key = "us dvorak" ]]; then
|
||
|
setxkbmap fr
|
||
|
else
|
||
|
setxkbmap fr
|
||
|
fi
|
||
|
|
||
|
key=`setxkbmap -query | grep "layout\|variant" | awk '{print $2}' | xargs`
|
||
|
notify-send "Keyboard Layout: $key"
|
||
|
|