106 lines
4.0 KiB
Bash
Executable File
106 lines
4.0 KiB
Bash
Executable File
#!/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="Popularne programy!!Instalacja najpopularniejszych programów:FBTN"
|
|
RESOURCES="<b>ZASOBY</b>"
|
|
QUICKSTART="Przewodnik użytkownika"
|
|
WWW="Strona WWW"
|
|
PROJECT="<b>PROJEKT</b>"
|
|
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="Install Popular Apps!!Install popular applications:FBTN"
|
|
RESOURCES="<b>RESOURCES</b>"
|
|
QUICKSTART="Quick Start Guide"
|
|
WWW="Website"
|
|
PROJECT="<b>PROJECT</b>"
|
|
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 --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" "manjaro-application-utility"\
|
|
--field=" :LBL" ""\
|
|
--field="$RESOURCES:LBL" ""\
|
|
--field="$QUICKSTART:FBTN" "bash -c userguide"\
|
|
--field="$WWW:FBTN" "bash -c homewww"\
|
|
--field="Forum:FBTN" "exo-open --launch WebBrowser forum.maboxlinux.org"\
|
|
--field=" :LBL" ""\
|
|
--field="$PROJECT:LBL" ""\
|
|
--field="$DEVELOPMENT" "exo-open --launch WebBrowser git.maboxlinux.org/Mabox"\
|
|
--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
|