#!/bin/sh layouts="US CUSTOM INTL IPA MATH SPECIAL BOXDRAW" choice="$(printf %s "$layouts" | wofi -S dmenu -p "Set keyboard layout:" -k /dev/null)" if [ "$?" -eq 0 ]; then if [ "$choice" = "US CUSTOM" ]; then swaymsg input '*' xkb_layout 'uscustom' elif [ "$choice" = "INTL" ]; then swaymsg input '*' xkb_layout 'us(intl)' elif [ "$choice" = "IPA" ]; then swaymsg input '*' xkb_layout 'ipa' elif [ "$choice" = "MATH" ]; then swaymsg input '*' xkb_layout 'math' elif [ "$choice" = "SPECIAL" ]; then swaymsg input '*' xkb_layout 'special' fi fi