Play with keyboards and languages
This commit is contained in:
parent
e978c38a60
commit
b23f9ab212
2 changed files with 15 additions and 4 deletions
|
@ -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 ]
|
||||
|
|
|
@ -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 "['<Super>Tab']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>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
|
||||
|
|
Loading…
Reference in a new issue