summaryrefslogtreecommitdiff
path: root/configs/mate/root-image/root/.language.sh
diff options
context:
space:
mode:
Diffstat (limited to 'configs/mate/root-image/root/.language.sh')
-rwxr-xr-xconfigs/mate/root-image/root/.language.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/configs/mate/root-image/root/.language.sh b/configs/mate/root-image/root/.language.sh
deleted file mode 100755
index d32e1f1..0000000
--- a/configs/mate/root-image/root/.language.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-finish=0 #If change locale the system need restart session to see the changes
-
-#Comprobe if language was selected
-code=$(cat ~/.codecheck | grep LANG= | tail --bytes 2)
-if [ $code = "0" ]; then
- lang=$(zenity --list --title="Select your locale" --column="Locale" --column="Language" \
- "en_US.UTF-8" "English" \
- "gl_ES.UTF-8" "Galego" \
- "es_ES.UTF-8" "Spanish" \
- "pt_BR.UTF-8" "Brazilian Portuguese")
-
- #Copy locale in locale.conf
- echo "LANG=$lang" > /etc/locale.conf
-
- #Put a new line confirm that language was selected
- sed -i '/LANG=./d' ~/.codecheck
- echo "LANG=1" >> ~/.codecheck
-
- #Copy icewm menu in that language and scripts to install
- cp -a ~/.icewm/menuLanguages/menu_${lang/_*/} ~/.icewm/menu
- cp -a ~/.scriptsInstallation/language/${lang/_*/}/* ~/.scriptsInstallation/
-
- finish=1
-fi
-
-#Comprobe if X11 keymap was selected
-code=$(cat .codecheck | grep XKBMAP= | cut -d '=' -f 2)
-if [ $code = "us" ]; then
- keymap=$(zenity --list --title="Select your keymap" --column="Keymap" $(localectl list-x11-keymap-layouts))
-
- setxkbmap $keymap
-
- #Save XKBMAP in .codecheck to use in other time. For example if you install X11 with scripts
- sed -i '/XKBMAP=./d' ~/.codecheck
- echo "XKBMAP=$keymap" >> ~/.codecheck
-fi
-
-if [ $finish -eq 1 ]; then
- #Restart session
- pkill -KILL -u root
-fi