diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index df37851..429d874 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -25,7 +25,7 @@ if [ ! -d "$HOME/.local/bin" ] ; then install -d -m 0700 "$HOME/.local/bin" ; fi export TZ=Europe/London # Can override this elsewhere if needed. if ! [ -f /run/.containerenv ] && ! [ -f "$XDG_CONFIG_HOME/locale.conf" ] && [ -x /usr/bin/locale ] then - LANG="en_US.UTF-8" /usr/bin/locale > "$XDG_CONFIG_HOME/locale.conf" + LANG="C.UTF-8" /usr/bin/locale > "$XDG_CONFIG_HOME/locale.conf" fi if ! [ -f /run/.containerenv ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ] then @@ -246,8 +246,9 @@ alias zlu="zypper list-updates" # Language aliases. ## Fedora/RHEL/CentOS: dnf install glibc-langpack-{en,fr} alias C="LANG=C.UTF-8" -alias en="LANG=en_US.UTF-8" alias fr="LANG=fr_FR.UTF-8" +alias gb="LANG=en_GB.UTF-8" +alias us="LANG=en_US.UTF-8" # Alias dig to drill if dig is not installed. if [ -x /usr/bin/drill ] diff --git a/roles/home-gui/files/gnome-setup.sh b/roles/home-gui/files/gnome-setup.sh index 6eb0357..a772438 100644 --- a/roles/home-gui/files/gnome-setup.sh +++ b/roles/home-gui/files/gnome-setup.sh @@ -21,13 +21,23 @@ set_favorites_bar set_keyboard_and_language () { gsettings set org.gnome.desktop.input-sources show-all-sources true - gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us')]" - gsettings set org.gnome.desktop.input-sources xkb-options "['compose:caps', 'shift:both_capslock']" gsettings set org.gnome.desktop.wm.keybindings switch-applications "['Tab']" gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['Tab']" gsettings set org.gnome.desktop.wm.keybindings switch-windows "['Tab']" gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['Tab']" + case "$LANG" in + "en_GB.UTF-8") + gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'gb'), ('xkb', 'fr+afnor')]" + ;; + "fr_FR.UTF-8") + gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'fr+afnor'), ('xkb', 'gb')]" + ;; + *) + gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'gb')]" + ;; + esac + # Set custom keybindings. if [ -x /usr/bin/kgx ] && ! [ -x /usr/bin/gnome-terminal ] then