From 556d92134e870047bd48683e4e4e009101f4c9b1 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Mon, 21 Sep 2020 15:25:36 +0200 Subject: [PATCH] mwelcome start changes --- bin/mabox-obstart | 4 +--- bin/mwelcome | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/bin/mabox-obstart b/bin/mabox-obstart index b0d7d60..c8d8ef6 100755 --- a/bin/mabox-obstart +++ b/bin/mabox-obstart @@ -38,12 +38,10 @@ startopenbox() { config_dir=${XDG_CONFIG_HOME:-$HOME/.config} rsync -aq --ignore-existing /etc/xdg/autostart/ $config_dir/autostart -# source Mabox main config file -. $HOME/.config/mabox/mabox.conf # Run mwelcome if not disaled +[ ! -f "$HOME/.config/mabox/.mwelcome" ] && mwelcome & -[ $show_welcome == true ] && mwelcome & virtualboxes } diff --git a/bin/mwelcome b/bin/mwelcome index eba85ea..cb07a64 100755 --- a/bin/mwelcome +++ b/bin/mwelcome @@ -1,8 +1,8 @@ #!/bin/bash export YAD_OPTIONS="--bool-fmt=t --separator='|'" -CONFIGFILE="$HOME/.config/mabox/mabox.conf" -. $CONFIGFILE + +if [ -f "$HOME/.config/mabox/.mwelcome" ];then show_welcome=false;else show_welcome=true;fi case $LANG in pl*) @@ -111,7 +111,7 @@ values=($(yad --window-icon=distributor-logo-mabox --center --buttons-layout="e --field=" :LBL" ""\ --field="$PROJECT:LBL" ""\ --field="$DEVELOPMENT" "exo-open --launch WebBrowser git.maboxlinux.org/Mabox"\ - --field="$DONATE" "bash -c homewww"\ + --field="$DONATE" "exo-open --launch WebBrowser https://maboxlinux.org/donate"\ --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)) @@ -120,7 +120,13 @@ values=($(yad --window-icon=distributor-logo-mabox --center --buttons-layout="e 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 +case $VAL in + true) + rm $HOME/.config/mabox/.mwelcome + ;; + false) + touch $HOME/.config/mabox/.mwelcome + ;; +esac + exit