summaryrefslogtreecommitdiff
path: root/.local/bin/layouttoggle
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-11-01 16:36:43 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-11-01 16:36:43 -0400
commit7c6065774adcc5adee9fd3220314ed149e4c1668 (patch)
tree93655262e224fd0f98da81d250abc3389899655b /.local/bin/layouttoggle
parentead615283a4302bba0dc10bec90a5e7625af60dc (diff)
Migrate from nvim-todoist to orgmode in sxhkd
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)"