mirror of
https://gitlab.com/jschx/ufetch.git
synced 2026-10-01 05:52:34 +07:00
Fallback to colorless mode when tput is not installed
This commit is contained in:
+12
-10
@@ -30,16 +30,18 @@ fi
|
||||
## DEFINE COLORS
|
||||
|
||||
# probably don't change these
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
# you can change these
|
||||
lc="${reset}${bold}${blue}" # labels
|
||||
|
||||
Reference in New Issue
Block a user