Skip to content

Commit

Permalink
Colorful help message, fixed typos. 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
q60 committed Jul 17, 2021
1 parent 91c32b9 commit f1f6cba
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions disfetch
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,36 @@

# help message
help() {
echo "disfetch is a CLI system information tool written in bash"
echo
echo "syntax: disfetch [options]"
echo "options:"
echo -e "\t-h, --help prints this message"
echo -e "\t-l, --logo sets distro logo to print"
echo -e "\t-m, --mono, --monochrome enables monochrome mode"
echo
printf "\x1B[93mdisfetch is a CLI system information tool written in bash\x1B[0m
\x1B[1msyntax\x1B[0m:
\tdisfetch \x1B[92m[options]\x1B[0m
\x1B[1moptions\x1B[0m:
\t\x1B[92m-h, --help\x1B[0m \x1B[93mprints this message\x1B[0m
\t\x1B[92m-l, --logo\x1B[0m \x1B[93msets distro logo to print\x1B[0m
\t\x1B[92m-m, --mono, --monochrome\x1B[0m \x1B[93menables monochrome mode\x1B[0m
\n"
}

# parse arguments
while [[ -n $1 && ! $1 == '--' ]]; do
case $1 in
-h | --help)
help; exit 0
;;
-l | --logo)
OS_LOGO=$2
;;
-m | --mono | --monochrome)
MONO=1
;;
*)
help; exit 0
;;
esac
shift
done

###########################################
# global stuff needed everywhere #
###########################################

# info array
INFO=()

Expand Down Expand Up @@ -126,7 +126,7 @@ ARCH=$(uname -m | awk '{print tolower($0)}')
uptime -p >/dev/null 2>&1
[ $? -eq 0 ] && UPTIME=$(uptime -p | awk '{ $1=""; print }' | tr -d "," | xargs) \
|| UPTIME=$(
awk '{
awk '{
uptime = $1;
if (uptime >= 604800) {
if (uptime >= 1209600) {
Expand Down

0 comments on commit f1f6cba

Please sign in to comment.