mabox-tools/bin/mabox-langfiles

29 lines
979 B
Plaintext
Raw Permalink Normal View History

2020-08-24 17:24:46 +02:00
#!/bin/bash
2022-11-09 22:56:06 +01:00
# Firstboot script
2022-05-27 15:52:10 +02:00
# Copy i18n files to ~ if available
2022-11-18 23:27:26 +01:00
# Check if Laptop|Notebook, otherwise disable power-manager
2022-05-27 15:52:10 +02:00
# Run only once invoked from openbox autostart
LNG=${LANG:0:2}
2020-08-24 17:24:46 +02:00
FILE="$HOME/.config/mabox/.lang"
if [ ! -f "$FILE" ]; then
2022-05-27 15:52:10 +02:00
if [ -d "/usr/share/mabox/lang/$LNG" ]; then
rsync -a /usr/share/mabox/lang/$LNG/ $HOME/
else
2020-09-07 22:20:36 +02:00
rsync -a /usr/share/mabox/lang/en/ $HOME/
2022-05-27 15:52:10 +02:00
fi
2022-06-07 12:24:13 +02:00
echo "selenized-black" > $HOME/.theme_history
2022-11-09 22:56:06 +01:00
# Power manager and tint2 native battery indicator only needed on Laptop/Netbook
2022-11-18 23:27:26 +01:00
TYPE=$(cat /sys/class/dmi/id/chassis_type)
case "$TYPE" in
8|9|10|14):;;
*)
2022-11-19 13:55:13 +01:00
mb-setvar Hidden=true "$HOME"/.config/autostart/xfce4-power-manager.desktop
2022-12-11 18:26:22 +01:00
# fix tint2 battery indicator bug spawning notifications even if there is no battery
sd "battery_low_cmd =.*$" "battery_low_cmd =" "$HOME"/.config/tint2/*.tint2rc
2022-11-18 23:27:26 +01:00
;;
esac
2020-08-24 17:24:46 +02:00
touch $HOME/.config/mabox/.lang
fi