mirror of
https://gitlab.com/jschx/ufetch.git
synced 2026-11-19 20:20:46 +00:00
Fallback to colorless mode when tput is not found; style fixes
This commit is contained in:
commit
a91b6de679
14 files changed
+201
-173
No files matched your search
+13
-11
@@ -30,21 +30,23 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${blue}" # labels
|
lc="${reset}${bold}${blue}" # labels
|
||||||
nc="${reset}${bold}${blue}" # user and hostname
|
nc="${reset}${bold}${blue}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${blue}" # first color
|
c0="${reset}${blue}" # first color
|
||||||
c1="${reset}${white}" # second color
|
c1="${reset}${white}" # second color
|
||||||
|
|
||||||
|
|||||||
+13
-11
@@ -30,21 +30,23 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${cyan}" # labels
|
lc="${reset}${bold}${cyan}" # labels
|
||||||
nc="${reset}${bold}${cyan}" # user and hostname
|
nc="${reset}${bold}${cyan}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${bold}${cyan}" # first color
|
c0="${reset}${bold}${cyan}" # first color
|
||||||
c1="${reset}${cyan}" # second color
|
c1="${reset}${cyan}" # second color
|
||||||
|
|
||||||
|
|||||||
+13
-11
@@ -30,21 +30,23 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${cyan}" # labels
|
lc="${reset}${bold}${cyan}" # labels
|
||||||
nc="${reset}${bold}${cyan}" # user and hostname
|
nc="${reset}${bold}${cyan}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${cyan}" # first color
|
c0="${reset}${cyan}" # first color
|
||||||
c1="${reset}${white}" # second color
|
c1="${reset}${white}" # second color
|
||||||
c2="${reset}${yellow}" # third color
|
c2="${reset}${yellow}" # third color
|
||||||
|
|||||||
+14
-12
@@ -30,23 +30,25 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${red}" # labels
|
lc="${reset}${bold}${red}" # labels
|
||||||
nc="${reset}${bold}${red}" # user and hostname
|
nc="${reset}${bold}${red}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${bold}${red}" # first color
|
c0="${reset}${bold}${red}" # first color
|
||||||
c1="${reset}${red}" # second color
|
c1="${reset}${red}" # second color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|
||||||
|
|||||||
+13
-11
@@ -30,21 +30,23 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${blue}" # labels
|
lc="${reset}${bold}${blue}" # labels
|
||||||
nc="${reset}${bold}${blue}" # user and hostname
|
nc="${reset}${bold}${blue}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${white}" # first color
|
c0="${reset}${white}" # first color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|||||||
+14
-12
@@ -30,23 +30,25 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput md)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput AF 0)"
|
bold="$(tput md)"
|
||||||
red="$(tput AF 1)"
|
black="$(tput AF 0)"
|
||||||
green="$(tput AF 2)"
|
red="$(tput AF 1)"
|
||||||
yellow="$(tput AF 3)"
|
green="$(tput AF 2)"
|
||||||
blue="$(tput AF 4)"
|
yellow="$(tput AF 3)"
|
||||||
magenta="$(tput AF 5)"
|
blue="$(tput AF 4)"
|
||||||
cyan="$(tput AF 6)"
|
magenta="$(tput AF 5)"
|
||||||
white="$(tput AF 7)"
|
cyan="$(tput AF 6)"
|
||||||
reset="$(tput me)"
|
white="$(tput AF 7)"
|
||||||
|
reset="$(tput me)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${red}" # labels
|
lc="${reset}${bold}${red}" # labels
|
||||||
nc="${reset}${bold}${red}" # user and hostname
|
nc="${reset}${bold}${red}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${bold}${red}" # first color
|
c0="${reset}${bold}${red}" # first color
|
||||||
c1="${reset}${red}" # second color
|
c1="${reset}${red}" # second color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|
||||||
|
|||||||
+16
-14
@@ -30,22 +30,24 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${magenta}" # labels
|
lc="${reset}${bold}${magenta}" # labels
|
||||||
nc="${reset}${bold}${magenta}" # user and hostname
|
nc="${reset}${bold}${magenta}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${bold}${magenta}" # first color
|
c0="${reset}${bold}${magenta}" # first color
|
||||||
c1="${reset}${magenta}" # second color
|
c1="${reset}${magenta}" # second color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|||||||
+16
-14
@@ -29,22 +29,24 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${black}" # labels
|
lc="${reset}${bold}${black}" # labels
|
||||||
nc="${reset}${bold}${black}" # user and hostname
|
nc="${reset}${bold}${black}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${bold}${black}" # first color
|
c0="${reset}${bold}${black}" # first color
|
||||||
c1="${reset}${white}" # second color
|
c1="${reset}${white}" # second color
|
||||||
c2="${reset}${yellow}" # third color
|
c2="${reset}${yellow}" # third color
|
||||||
|
|
||||||
|
|||||||
+17
-15
@@ -9,13 +9,13 @@ host="$(hostname)"
|
|||||||
os="$(sw_vers -productName) $(sw_vers -productVersion)"
|
os="$(sw_vers -productName) $(sw_vers -productVersion)"
|
||||||
kernel="$(uname -sr)"
|
kernel="$(uname -sr)"
|
||||||
uptime="$(uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | sed -e 's/^[ \t]*//')"
|
uptime="$(uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | sed -e 's/^[ \t]*//')"
|
||||||
if command -v pkgin &> /dev/null; then
|
if [ -x "$(command -v pkgin)" ]; then
|
||||||
packages="$(pkgin list | wc -l)"
|
packages="$(pkgin list | wc -l)"
|
||||||
elif command -v brew &> /dev/null; then
|
elif [ -x "$(command -v brew)" ]; then
|
||||||
brew_packages="$(brew list | wc -l)"
|
brew_packages="$(brew list | wc -l)"
|
||||||
cask_packages="$(brew cask list 2> /dev/null | wc -l)"
|
cask_packages="$(brew cask list 2> /dev/null | wc -l)"
|
||||||
packages="$(( ${brew_packages} + ${cask_packages} ))"
|
packages="$(( ${brew_packages} + ${cask_packages} ))"
|
||||||
elif command -v port &> /dev/null; then
|
elif [ -x "$(command -v port)" ]; then
|
||||||
packages="$(port installed | wc -l)"
|
packages="$(port installed | wc -l)"
|
||||||
else
|
else
|
||||||
packages='no package manager'
|
packages='no package manager'
|
||||||
@@ -29,22 +29,24 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}" # labels
|
lc="${reset}${bold}" # labels
|
||||||
nc="${reset}${bold}" # user and hostname
|
nc="${reset}${bold}" # user and hostname
|
||||||
ic="${reset}" # info
|
ic="${reset}" # info
|
||||||
c0="${reset}" # first color
|
c0="${reset}" # first color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|
||||||
|
|||||||
+15
-13
@@ -30,21 +30,23 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${green}" # labels
|
lc="${reset}${bold}${green}" # labels
|
||||||
nc="${reset}${bold}${green}" # user and hostname
|
nc="${reset}${bold}${green}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${green}" # first color
|
c0="${reset}${green}" # first color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|||||||
+13
-11
@@ -30,21 +30,23 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${blue}" # labels
|
lc="${reset}${bold}${blue}" # labels
|
||||||
nc="${reset}${bold}${blue}" # user and hostname
|
nc="${reset}${bold}${blue}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${blue}" # first color
|
c0="${reset}${blue}" # first color
|
||||||
c1="${reset}${bold}${blue}" # second color
|
c1="${reset}${bold}${blue}" # second color
|
||||||
|
|
||||||
|
|||||||
+16
-14
@@ -30,24 +30,26 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${yellow}" # labels
|
lc="${reset}${bold}${yellow}" # labels
|
||||||
nc="${reset}${bold}${yellow}" # user and hostname
|
nc="${reset}${bold}${yellow}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${yellow}" # first color
|
c0="${reset}${yellow}" # first color
|
||||||
c1="${reset}${white}" # second color
|
c1="${reset}${white}" # second color
|
||||||
c2="${reset}${bold}${yellow}" # third color
|
c2="${reset}${bold}${yellow}" # third color
|
||||||
|
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|||||||
+12
-10
@@ -30,16 +30,18 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${red}" # labels
|
lc="${reset}${bold}${red}" # labels
|
||||||
|
|||||||
+16
-14
@@ -30,22 +30,24 @@ fi
|
|||||||
## DEFINE COLORS
|
## DEFINE COLORS
|
||||||
|
|
||||||
# probably don't change these
|
# probably don't change these
|
||||||
bold="$(tput bold)"
|
if [ -x "$(command -v tput)" ]; then
|
||||||
black="$(tput setaf 0)"
|
bold="$(tput bold)"
|
||||||
red="$(tput setaf 1)"
|
black="$(tput setaf 0)"
|
||||||
green="$(tput setaf 2)"
|
red="$(tput setaf 1)"
|
||||||
yellow="$(tput setaf 3)"
|
green="$(tput setaf 2)"
|
||||||
blue="$(tput setaf 4)"
|
yellow="$(tput setaf 3)"
|
||||||
magenta="$(tput setaf 5)"
|
blue="$(tput setaf 4)"
|
||||||
cyan="$(tput setaf 6)"
|
magenta="$(tput setaf 5)"
|
||||||
white="$(tput setaf 7)"
|
cyan="$(tput setaf 6)"
|
||||||
reset="$(tput sgr0)"
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
# you can change these
|
# you can change these
|
||||||
lc="${reset}${bold}${green}" # labels
|
lc="${reset}${bold}${green}" # labels
|
||||||
nc="${reset}${bold}${green}" # user and hostname
|
nc="${reset}${bold}${green}" # user and hostname
|
||||||
ic="${reset}${bold}${white}" # info
|
ic="${reset}${bold}${white}" # info
|
||||||
c0="${reset}${bold}${green}" # first color
|
c0="${reset}${bold}${green}" # first color
|
||||||
c1="${reset}${green}" # second color
|
c1="${reset}${green}" # second color
|
||||||
|
|
||||||
## OUTPUT
|
## OUTPUT
|
||||||
|
|||||||
Reference in new issue
Block a user