#!/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 $USER !\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Życzymy miłych wrażeń, nie zapomnij podzielić się Maboxem ze znajomymi\n" UPDATE="Uaktualnij system" UPDATE_LBL="Aktualizacja systemu" ADD_KERNEL="Dodatkowe jądro!!Dobrą praktyką jest instakacja dodatkowego kernela. Kliknij, aby wybrać i zainstalować:FBTN" RELNOTES="Popularne programy!!Instalacja najpopularniejszych programów:FBTN" RESOURCES="ZASOBY" QUICKSTART="Przewodnik użytkownika" WWW="Strona WWW" PROJECT="PROJEKT" 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. \nEnjoy the experience, and don't hesitate to send us your feedback.\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 LTS one and install newer one.:FBTN" RELNOTES="Pulular Apps!!Install popular applications:FBTN" RESOURCES="RESOURCES" QUICKSTART="Quick Start Guide" WWW="Website" PROJECT="PROJECT" 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="$OSNAME $OSVERSION $OSCODE\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 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