145 lines
5.4 KiB
Bash
Executable File
145 lines
5.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
export YAD_OPTIONS="--bool-fmt=t --separator='|'"
|
|
|
|
if [ -f "$HOME/.config/mabox/.mwelcome" ];then show_welcome=false;else show_welcome=true;fi
|
|
|
|
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
|
|
;;
|
|
es*)
|
|
function homewww() {
|
|
exo-open --launch WebBrowser https://maboxlinux.org
|
|
}
|
|
export -f homewww
|
|
function userguide() {
|
|
exo-open --launch WebBrowser https://manual.maboxlinux.org/es/
|
|
}
|
|
export -f userguide
|
|
;;
|
|
*)
|
|
function homewww() {
|
|
exo-open --launch WebBrowser https://maboxlinux.org
|
|
}
|
|
export -f homewww
|
|
function userguide() {
|
|
exo-open --launch WebBrowser https://manual.maboxlinux.org/en/
|
|
}
|
|
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"
|
|
START="<b>START</b>"
|
|
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"
|
|
IRC="Kanał IRC:FBTN"
|
|
DONATE="Wesprzyj:FBTN"
|
|
LAUNCH_AT_START="Uruchamiaj przy starcie:CHK"
|
|
CLOSE="Zamknij"
|
|
;;
|
|
es*)
|
|
TITLE="Bienvenido a Mabox!"
|
|
KERN_LBL="kernel: "
|
|
TXT1="Bienvenido $USER ! \nGracias por elegir Mabox Linux. Esperamos que Ud. disfrute usando Mabox del mismo modo como nosotros disfrutamos en construirlo. Los vínculos de abajo le ayudarán para iniciar el uso de su nuevo sistema operativo.
|
|
\n<i>Disfrute esta experiencia, y no dude en enviarnos sus comentarios.</i>\n"
|
|
START="<b>INICIO</b>"
|
|
UPDATE="Actualizar el sistema"
|
|
UPDATE_LBL="System update"
|
|
ADD_KERNEL="Agregar núcleo!!Es una buena idea tener más de un núcleo instalado. Sugerimos mantener un núcleo <b>LTS</b> y además <b>instalar otro más actualizado</b>.:FBTN"
|
|
RELNOTES="Instalar Aplicaciones!!Instale aplicaciones populares:FBTN"
|
|
RESOURCES="<b>RECURSOS</b>"
|
|
QUICKSTART="Guía de inicio rápido"
|
|
WWW="Sitio web"
|
|
PROJECT="<b>PROYECTO</b>"
|
|
DEVELOPMENT="Desarrollo:FBTN"
|
|
IRC="Canal IRC:FBTN"
|
|
DONATE="Donar:FBTN"
|
|
LAUNCH_AT_START="Lanzar al inicio:CHK"
|
|
CLOSE="Salir"
|
|
;;
|
|
*)
|
|
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"
|
|
START="<b>START</b>"
|
|
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"
|
|
IRC="IRC channel: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="$START: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" "exo-open --launch WebBrowser https://ko-fi.com/maboxlinux"\
|
|
--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[13]}
|
|
done <<< "$values"
|
|
case $VAL in
|
|
true)
|
|
rm $HOME/.config/mabox/.mwelcome
|
|
;;
|
|
false)
|
|
touch $HOME/.config/mabox/.mwelcome
|
|
;;
|
|
esac
|
|
|
|
exit
|