Skip to content

Instantly share code, notes, and snippets.

@strund3r
Last active December 1, 2020 11:46
Show Gist options
  • Save strund3r/7e67980d8f2d29a335e8316f1c94fbd8 to your computer and use it in GitHub Desktop.
Save strund3r/7e67980d8f2d29a335e8316f1c94fbd8 to your computer and use it in GitHub Desktop.
Set keyboard layout to US-Intl without dead keys on Ubuntu
#!/bin/bash
#US=$(setxkbmap -layout us -variant intl)
#BR=$(setxkbmap -model abnt2 -layout br -variant abnt2)
PS3="Choose your keyboard layout: "
options=("US-INTL" "BR-ABNT2" "Quit")
select opt in "${options[@]}"
do
case $opt in
"US-INTL")
setxkbmap -layout us -variant intl
echo "Changed to US-INTL"
;;
"BR-ABNT2")
setxkbmap -model abnt2 -layout br -variant abnt2
echo "Changed to BR-ABNT2"
;;
"Quit")
break
;;
*) echo "Invalid Option $REPLY";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment