mabox-tools/bin/mabox-langfiles

27 lines
800 B
Bash
Executable File

#!/bin/bash
# Firstboot script
# Copy i18n files to ~ if available
# Check if Laptop|Notebook, otherwise disable power-manager
# Run only once invoked from openbox autostart
LNG=${LANG:0:2}
FILE="$HOME/.config/mabox/.lang"
if [ ! -f "$FILE" ]; then
if [ -d "/usr/share/mabox/lang/$LNG" ]; then
rsync -a /usr/share/mabox/lang/$LNG/ $HOME/
else
rsync -a /usr/share/mabox/lang/en/ $HOME/
fi
echo "selenized-black" > $HOME/.theme_history
# Power manager and tint2 native battery indicator only needed on Laptop/Netbook
TYPE=$(cat /sys/class/dmi/id/chassis_type)
case "$TYPE" in
8|9|10|14):;;
*)
echo "Hidden=true" >> "$HOME"/.config/autostart/xfce4-power-manager.desktop
;;
esac
touch $HOME/.config/mabox/.lang
fi