From 07d2800b433166cfb3cb7491ac71841fd77668c2 Mon Sep 17 00:00:00 2001
From: Gustaf Rydholm <gustaf.rydholm@gmail.com>
Date: Mon, 15 May 2023 23:41:06 +0200
Subject: Add notify when changing kb layout

---
 .local/bin/layouthandler | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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
-- 
cgit v1.2.3-70-g09d2