added new script :D
This commit is contained in:
parent
88cc5448b9
commit
053f34024b
24
scripts/kbswitcher
Executable file
24
scripts/kbswitcher
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
fn="/tmp/kbswitcher.status"
|
||||
|
||||
layout=""
|
||||
|
||||
# first run the file won't exist
|
||||
if [ ! -f "$fn" ]; then
|
||||
layout="dvorak"
|
||||
echo "dvorak" > "$fn"
|
||||
else
|
||||
case $(cat "$fn") in
|
||||
us)
|
||||
echo "dvorak" > "$fn"
|
||||
layout="dvorak"
|
||||
;;
|
||||
dvorak)
|
||||
echo "us" > "$fn"
|
||||
layout="us"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
setxkbmap -layout "$layout" -option ctrl:nocaps
|
||||
Reference in New Issue
Block a user