diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-05-15 23:41:06 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-05-15 23:41:06 +0200 |
commit | 07d2800b433166cfb3cb7491ac71841fd77668c2 (patch) | |
tree | 1b0e315a1d0cc123db82f5f65023f13b540ff673 | |
parent | d8a759b0bb0e510e1ea037a3f10e42a61fc4e618 (diff) |
Add notify when changing kb layout
-rwxr-xr-x | .local/bin/layouthandler | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.local/bin/layouthandler b/.local/bin/layouthandler index 0596799..6002ef4 100755 --- a/.local/bin/layouthandler +++ b/.local/bin/layouthandler @@ -1,13 +1,17 @@ #!/bin/sh layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }')" -alt_layout=${ALT_KB_LAYOUT?Alternative layout not set!} +alt_layout="${ALT_KB_LAYOUT?Alternative layout not set!}" + +echo "$layout" case $layout in en_US) setxkbmap -layout "$alt_layout" + notify-send "Layout Changed." "Keyboard set to $alt_layout." ;; *) setxkbmap -layout en_US + notify-send "Layout Changed." "Keyboard set to en_US." ;; esac |