diff options
Diffstat (limited to '.scripts')
-rwxr-xr-x | .scripts/switch-keyboard-layout | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.scripts/switch-keyboard-layout b/.scripts/switch-keyboard-layout new file mode 100755 index 0000000..124fd9c --- /dev/null +++ b/.scripts/switch-keyboard-layout @@ -0,0 +1,11 @@ +#!/bin/bash + +current_layout=$(setxkbmap -query | awk '/variant/{print $2}') + +if [[ "$current_layout" == "dvorak" ]]; then + setxkbmap -layout us -option caps:swapescape + notify-send "Keyboard Layout" "Switched to QWERTY" +else + setxkbmap -layout us -variant dvorak -option caps:swapescape + notify-send "Keyboard Layout" "Switched to Dvorak" +fi |