summaryrefslogtreecommitdiff
path: root/.local/bin/layouttoggle
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/layouttoggle')
-rwxr-xr-x.local/bin/layouttoggle28
1 files changed, 15 insertions, 13 deletions
diff --git a/.local/bin/layouttoggle b/.local/bin/layouttoggle
index 139ceb9..d1ceba5 100755
--- a/.local/bin/layouttoggle
+++ b/.local/bin/layouttoggle
@@ -1,18 +1,20 @@
#!/bin/sh
-layout=$(cat $HOME/.cache/layout)
+layout=$(cat "$HOME/.cache/layout")
case "$layout" in
- ca) setxkbmap -model pc104 -layout us -variant ,,
- echo us > $HOME/.cache/layout
- ;;
- us) setxkbmap -model pc104 -layout ca -variant ,,
- echo ca > $HOME/.cache/layout
- ;;
- *) setxkbmap -model pc104 -layout us -variant ,,
- echo us > $HOME/.cache/layout
- ;;
- esac
-
-kill -38 $(pidof dwmblocks)
+ca)
+ setxkbmap -model pc104 -layout us -variant ,,
+ echo us >"$HOME/.cache/layout"
+ ;;
+us)
+ setxkbmap -model pc104 -layout ca -variant ,,
+ echo ca >"$HOME/.cache/layout"
+ ;;
+*)
+ setxkbmap -model pc104 -layout us -variant ,,
+ echo us >"$HOME/.cache/layout"
+ ;;
+esac
+kill -38 "$(pidof dwmblocks)"