From aeeac56c1f4e54021e58b0805b2e70c7779bceba Mon Sep 17 00:00:00 2001 From: G2-Games <72430668+G2-Games@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:21:08 -0500 Subject: [PATCH] Updated and streamlined script, added updater to install script --- config.cfg | 38 ++++++++++++++++++++++++++++++++++++++ welcome.sh | 6 ++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 config.cfg diff --git a/config.cfg b/config.cfg new file mode 100644 index 0000000..4c62d15 --- /dev/null +++ b/config.cfg @@ -0,0 +1,38 @@ +#==================SETUP=================# +# Select which parts you want active by # +# commenting them out. For example, on a # +# desktop, disabling the battery message # +# is a good idea. You can also re-order # +# them to change how they display! # +#========================================# + +greetings=("Welcome" "Greetings" "Hello" "Hi") # Add your own greetings! +randgreeting="off" #< Turn the random greetings on (eg. "Hello , Hi ") +twelvehour="on" #< Switch between 12 and 24 hour time (eg. 8:00 PM vs 20:00) +rechargenotif="off" #< Notify that you should recharge if below 15% +flatpakupd="off" #< Check for flatpak updates, this slows startup down A LOT +goodgreeting="on" #< Display greetings like "Good afternoon," else "It's afternoon" +displaydate="off" #< Unused so far + +#=========COLORS=======# +NCOL='\e[0m' +BOLD='\e[1m' +ITAL='\e[3m' +UNDR='\e[4m' +BLNK='\e[5m' + +# Battery level colors +CRIT='\e[31m' +LOW='\e[33m' +NORM='\e[32m' +FULL='\e[3;4;92m' + +TIME='\e[38;2;224;146;252;1m' # Clock color +DATE='\e[38;2;50;168;82;1m' # Future "Date" item color +USRC=$(randcolor) # Username color + +# Greeting colors +NIGH='\e[38;2;200;107;209m' +MORN='\e[38;2;255;164;74m' +AFTN='\e[38;2;250;245;110m' +EVEN='\e[38;2;171;54;3m' diff --git a/welcome.sh b/welcome.sh index 0457a18..e56256f 100755 --- a/welcome.sh +++ b/welcome.sh @@ -1,4 +1,4 @@ -version=0.3.0 +version=1.0.0 #========Welcome=======# welcome () { @@ -159,7 +159,7 @@ randcolor() { # to modify it for a light one # cluma=0 loops=0 - while [[ $(printf %.0f $cluma) -le 100 ]] && [[ $loops -le 10 ]]; + while [ $(printf %.0f $cluma) -le 100 ] && [ $loops -le 10 ]; do cr=$((0 + $RANDOM % 255)) crl=$(echo "$cr 0.299" | awk '{print $1 * $2}') @@ -211,6 +211,8 @@ rechargenotif="off" #< Notify that you should recharge if below 15% flatpakupd="off" #< Check for flatpak updates, this slows startup down A LOT goodgreeting="on" #< Display greetings like "Good afternoon," else "It's afternoon" +source config.cfg + welcome greeting clock