diff --git a/keylay.sh b/keylay.sh new file mode 100755 index 0000000..86b437e --- /dev/null +++ b/keylay.sh @@ -0,0 +1,17 @@ +#!/usr/bin/bash +current_layout=$( hyprctl devices -j | + jq -r '.keyboards[] | .layout' | + head -n1 | + cut -c1-2 | + tr 'a-z' 'A-Z' +) + +layout="us" + +if [ $current_layout == "US" ]; then + layout="tr" +fi + +hyprctl keyword input:kb_layout $layout +notify-send --urgency=low --expire-time=1000 --icon="/media/yigid/share/shoka/pictures/506 icon packs/cp.png" "Keyboard layout changed" "You are now on $layout" +