diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2023-11-02 21:44:21 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2023-11-02 21:44:21 -0400 |
commit | 2066de2e4a639d1bfff7823ae37cb21a575799d0 (patch) | |
tree | bb6edc404a8023724a5744cb0ca19b6c84c0f96f /.local/bin/layouttoggle | |
parent | 82f25ae86ec13a41a77ad42d7c3a053148bbba55 (diff) | |
parent | 7c6065774adcc5adee9fd3220314ed149e4c1668 (diff) |
Merge branch 'master' of github.com:ChausseBenjamin/dotfiles
Diffstat (limited to '.local/bin/layouttoggle')
-rwxr-xr-x | .local/bin/layouttoggle | 28 |
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)" |