2020-02-18 17:24:18 +01:00
#!/bin/bash
export YAD_OPTIONS="--bool-fmt=t --separator='|'"
CONFIGFILE="$HOME/.config/mabox/mabox.conf"
. $CONFIGFILE
case $LANG in
pl*)
function homewww() {
exo-open --launch WebBrowser https://pl.maboxlinux.org
}
export -f homewww
function userguide() {
exo-open --launch WebBrowser https://pl.maboxlinux.org/przewodnik-uzytkownika/
}
export -f userguide
;;
*)
function homewww() {
exo-open --launch WebBrowser https://maboxlinux.org
}
export -f homewww
function userguide() {
exo-open --launch WebBrowser https://maboxlinux.org/users-guide/
}
export -f userguide
;;
esac
FB="exo-open --launch WebBrowser www.facebook.com/maboxlinux/"
case $LANG in
pl*)
TITLE="Witaj w Mabox!"
TXT1="Witaj <b>$USER</b> !\nDziękujemy za wybranie Mabox Linux. Mamy nadzieję, że używanie Mabox sprawi Ci tyle radości, co nam praca nad jego przygotowaniem.
Poniższe odnośniki pomogą Ci w rozpoczęciu używania nowego systemu.
\n<i>Życzymy miłych wrażeń, nie zapomnij podzielić się Maboxem ze znajomymi</i>\n"
UPDATE="Uaktualnij system"
UPDATE_LBL="Aktualizacja systemu"
ADD_KERNEL="Dodatkowe jądro!!Dobrą praktyką jest <b>instakacja dodatkowego kernela</b>. Kliknij, aby wybrać i zainstalować:FBTN"
RELNOTES="Informacje o wydaniu:FBTN"
2020-02-20 01:21:01 +01:00
RESOURCES="<b>ZASOBY</b>"
2020-02-18 17:24:18 +01:00
QUICKSTART="Przewodnik użytkownika"
WWW="Strona WWW"
2020-02-20 01:21:01 +01:00
PROJECT="<b>PROJEKT</b>"
2020-02-18 17:24:18 +01:00
DEVELOPMENT="Rozwój:FBTN"
DONATE="Wesprzyj:FBTN"
LAUNCH_AT_START="Uruchamiaj przy starcie:CHK"
CLOSE="Zamknij"
;;
*)
TITLE="Welcome to Mabox!"
KERN_LBL="kernel: "
TXT1="Welcome $USER ! \nThank you for choosing Mabox Linux. We hope that you will enjoy using Mabox as much as we enjoy building it. The links below will help you get started with your new operating system.
\n<i>Enjoy the experience, and don't hesitate to send us your feedback.</i>\n"
UPDATE="Update system"
UPDATE_LBL="System update"
ADD_KERNEL="Add Kernel!!It is good practice to have more than one kernel installed. We suggest to keep <b>LTS</b> one and <b>install newer one</b>.:FBTN"
RELNOTES="Release Notes:FBTN"
2020-02-20 01:21:01 +01:00
RESOURCES="<b>RESOURCES</b>"
2020-02-18 17:24:18 +01:00
QUICKSTART="Quick Start Guide"
WWW="Website"
2020-02-20 01:21:01 +01:00
PROJECT="<b>PROJECT</b>"
2020-02-18 17:24:18 +01:00
DEVELOPMENT="Development:FBTN"
DONATE="Donate:FBTN"
LAUNCH_AT_START="Launch at start:CHK"
CLOSE="Exit"
;;
esac
OSNAME=$(lsb_release -d | awk '{print $2}')
OSVERSION=$(lsb_release -r | awk '{print $2}')
OSCODE=$(lsb_release -c | awk '{print $2}')
FONT="foreground='dark green' font='14'"
values=($(yad --window-icon=distributor-logo-mabox --center --undecorated --buttons-layout="edge" --borders=20 --width=520 --height=380 \
--image=/usr/share/icons/mabox_trans_64.png --image-on-top \
--text="<span $FONT>$OSNAME $OSVERSION $OSCODE</span>\n\n$TXT1" \
--title="$TITLE" \
--columns=3 --align="center" --form \
--field="<b>START</b>:LBL" ""\
--field="$UPDATE:FBTN" "pamac-manager --updates" \
--field="$ADD_KERNEL" "manjaro-settings-manager -m msm_kernel" \
--field="$RELNOTES" ""\
--field=" :LBL" ""\
2020-02-20 01:21:01 +01:00
--field="$RESOURCES:LBL" ""\
2020-02-18 17:24:18 +01:00
--field="$QUICKSTART:FBTN" "bash -c userguide"\
--field="$WWW:FBTN" "bash -c homewww"\
--field="Forum:FBTN" "exo-open --launch WebBrowser forum.maboxlinux.org"\
--field=" :LBL" ""\
2020-02-20 01:21:01 +01:00
--field="$PROJECT:LBL" ""\
2020-02-18 17:24:18 +01:00
--field="$DEVELOPMENT" "exo-open --launch WebBrowser gitlab.maboxlinux.org/explore/projects"\
--field="$DONATE" "bash -c homewww"\
--field=" :LBL" ""\
--field="$LAUNCH_AT_START" "$show_welcome" \
--button="FB":"$FB" --button="YT":"exo-open --launch WebBrowser www.youtube.com/channel/UCuiznSWZXPCnkRKjNfWwF5Q" --button=$CLOSE:0))
#if [ $? -eq 0 ]; then
while IFS='|' read -ra ADDR; do
VAL=${ADDR[14]}
done <<< "$values"
sed -i'.temp' -e 's/^show_welcome.*$/show_welcome='"$VAL"'/g' $CONFIGFILE
rm $CONFIGFILE.temp
#fi
exit