Skip to content

Instantly share code, notes, and snippets.

@naaando
Created February 18, 2018 19:20
Show Gist options
  • Save naaando/ca2105808b546d0c7c95a3577e602a4f to your computer and use it in GitHub Desktop.
Save naaando/ca2105808b546d0c7c95a3577e602a4f to your computer and use it in GitHub Desktop.
Patch accent fix for qt apps
#!/bin/bash
function remove_ibus {
cat $1 | grep -v "ibus" $1 > $1
}
# Fix keyboard accents
echo "Disabling ibus daemon..."
remove_ibus ~/.xprofile
remove_ibus ~/.profile
echo "Fixing keyboard with xim"
if (cat ~/.xprofile | grep "QT_IM_MODULE=xim">/dev/null); then
echo "xim already set for Qt up on login"
else
touch ~/.xprofile
echo "export QT_IM_MODULE=xim" >> ~/.xprofile
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment