OSDN Git Service

add toast
[instantos/instantOS.git] / programs / instantkeyswitch
index fb8febe..16ea7f9 100755 (executable)
@@ -34,7 +34,13 @@ if [ "$TMPINDEX" -gt "$LAYOUTCOUNT" ]; then
     TMPINDEX=1
 fi
 
-setxkbmap -layout "$(sed -n "${TMPINDEX}p" "$KEYCONF")"
+NEWLAYOUT="$(sed -n "${TMPINDEX}p" "$KEYCONF")"
 
-# save index 
+{
+    setxkbmap -layout "$NEWLAYOUT" || notify-send 'failed setting the layout'
+} &
+
+imenu -t "Keyboard layout: $NEWLAYOUT"
+
+# save index
 echo "$TMPINDEX" >"$TMPPATH"