Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save flaprano/fd27c7bf34de78964b2d71ad3f8bf76e to your computer and use it in GitHub Desktop.
Save flaprano/fd27c7bf34de78964b2d71ad3f8bf76e to your computer and use it in GitHub Desktop.
Using cedilha - ArchLinux Cinnamon
Author: Nilo Dantas - n1lo
Based on: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - helio-valente post
How to use Cedilha on US Keyboard on ArchLinux
1) Put: English(US, internacional with dead Keys) on your system keyboard layout.
2) Editing the files:
sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache
sudo vim /usr/lib/gtk-2.0/2.10.0/immodules.cache
changing the line
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"
to
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"
3) replacing "ć" to "ç" and "Ć" to "Ç" on /usr/share/X11/locale/en_US.UTF-8/Compose
sudo cp /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/en_US.UTF-8/Compose.bak
sed 's/ć/ç/g' < /usr/share/X11/locale/en_US.UTF-8/Compose | sed 's/Ć/Ç/g' > Compose
sudo mv Compose /usr/share/X11/locale/en_US.UTF-8/Compose
4) add two lines on /etc/environment
GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla
5)restart your computer
@flaprano
Copy link
Author

flaprano commented Jan 2, 2021

For VScode to work:

There is the x11 Compose file /usr/share/X11/locale/pt_BR.UTF-8/Compose for Brazilian Portuguese with this contents:

include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<dead_acute> : "Ç" Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA
<dead_acute> : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA
So, whichever language you are using, all you need to do, to make '+c result in ç, is:

Generate the pt_BR.UTF-8 locale, if it's not already available:

sudo locale-gen pt_BR.UTF-8

Add this line to your ~/.profile file:

export LC_CTYPE=pt_BR.UTF-8

If you are a Brazilian user, and install the Portuguese language - either when installing or later from Language Support - you can skip the just mentioned steps. Instead you can just open Language Support and select Brazilian Portuguese as the display language. As from Ubuntu 15.04 it's sufficient to select Brazilian Portuguese as the Regional Formats setting.

Edit:

And a third way, if you don't want to change the LC_CTYPE variable, is to create an ~/.XCompose file and give it this contents:

<dead_acute> : "Ç" Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA
<dead_acute> : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA

From: https://askubuntu.com/questions/363115/how-to-type-latin-small-letter-c-with-cedilla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment