mabox-tools/bin/mwelcome

146 lines
5.4 KiB
Plaintext
Raw Permalink Normal View History

2020-02-18 17:24:18 +01:00
#!/bin/bash
export YAD_OPTIONS="--bool-fmt=t --separator='|'"
2020-09-21 15:25:36 +02:00
if [ -f "$HOME/.config/mabox/.mwelcome" ];then show_welcome=false;else show_welcome=true;fi
2020-02-18 17:24:18 +01:00
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/
}
2022-05-03 13:05:27 +02:00
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/
}
2020-02-18 17:24:18 +01:00
export -f userguide
;;
*)
2022-05-03 13:05:27 +02:00
function homewww() {
2020-02-18 17:24:18 +01:00
exo-open --launch WebBrowser https://maboxlinux.org
}
export -f homewww
function userguide() {
2022-05-03 13:05:27 +02:00
exo-open --launch WebBrowser https://manual.maboxlinux.org/en/
2020-02-18 17:24:18 +01:00
}
export -f userguide
;;
esac
FB="exo-open --launch WebBrowser www.facebook.com/maboxlinux/"
2023-06-01 01:40:03 +02:00
YT="exo-open --launch WebBrowser www.youtube.com/channel/UCuiznSWZXPCnkRKjNfWwF5Q"
2020-02-18 17:24:18 +01:00
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>"
2020-02-18 17:24:18 +01:00
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"
2020-02-26 15:15:51 +01:00
RELNOTES="Popularne programy!!Instalacja najpopularniejszych programów: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"
2021-08-12 15:48:47 +02:00
IRC="Kanał IRC:FBTN"
2020-02-18 17:24:18 +01:00
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"
2021-08-12 15:48:47 +02:00
IRC="Canal IRC:FBTN"
DONATE="Donar:FBTN"
LAUNCH_AT_START="Lanzar al inicio:CHK"
CLOSE="Salir"
;;
2020-02-18 17:24:18 +01:00
*)
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>"
2020-02-18 17:24:18 +01:00
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"
2020-02-26 16:50:56 +01:00
RELNOTES="Install Popular Apps!!Install popular applications: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"
2021-08-12 15:48:47 +02:00
IRC="IRC channel:FBTN"
2020-02-18 17:24:18 +01:00
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'"
2020-03-07 02:23:15 +01:00
values=($(yad --window-icon=distributor-logo-mabox --center --buttons-layout="edge" --borders=20 --width=520 --height=380 \
2020-02-18 17:24:18 +01:00
--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" ""\
2020-02-18 17:24:18 +01:00
--field="$UPDATE:FBTN" "pamac-manager --updates" \
--field="$ADD_KERNEL" "manjaro-settings-manager -m msm_kernel" \
2020-02-26 15:15:51 +01:00
--field="$RELNOTES" "manjaro-application-utility"\
2020-02-18 17:24:18 +01:00
--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"\
2021-08-12 15:48:47 +02:00
--field="Forum:FBTN" "exo-open --launch WebBrowser forum.maboxlinux.org"\
2020-02-18 17:24:18 +01:00
--field=" :LBL" ""\
2020-02-20 01:21:01 +01:00
--field="$PROJECT:LBL" ""\
2023-06-01 01:40:03 +02:00
--field="$DEVELOPMENT" "exo-open --launch WebBrowser https://git.maboxlinux.org/Mabox"\
2022-06-05 16:19:15 +02:00
--field="$DONATE" "exo-open --launch WebBrowser https://ko-fi.com/maboxlinux"\
2020-02-18 17:24:18 +01:00
--field="$LAUNCH_AT_START" "$show_welcome" \
2023-06-01 01:40:03 +02:00
--button=" FB":"$FB" --button="輸 YT":"$YT" --button=$CLOSE:0))
2020-02-18 17:24:18 +01:00
#if [ $? -eq 0 ]; then
while IFS='|' read -ra ADDR; do
2022-06-06 12:53:37 +02:00
VAL=${ADDR[13]}
2020-02-18 17:24:18 +01:00
done <<< "$values"
2020-09-21 15:25:36 +02:00
case $VAL in
true)
rm $HOME/.config/mabox/.mwelcome
;;
false)
touch $HOME/.config/mabox/.mwelcome
;;
esac
2020-02-18 17:24:18 +01:00
exit