dotfiles/bin/.bin/switchkblayout
Anthony Debucquoy 9eede5ef5f
First Commit
This is a first dotfiles config. I think I have a lot more to add tho...
2023-10-24 23:29:07 +02:00

18 lines
385 B
Bash
Executable File

#!/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"