Prin format changes
This commit is contained in:
parent
269a979464
commit
5ec79cf617
1 changed files with 8 additions and 14 deletions
22
neofetch
22
neofetch
|
@ -2220,21 +2220,15 @@ info () {
|
||||||
# Prin {{{
|
# Prin {{{
|
||||||
|
|
||||||
prin () {
|
prin () {
|
||||||
case "$1" in
|
if [ -z "$2" ]; then
|
||||||
*:*)
|
string="${info_color}${1}"
|
||||||
subtitle=${1%%:*}
|
length=${#1}
|
||||||
output=${1#*: }
|
|
||||||
|
|
||||||
string="${bold}${subtitle_color}${subtitle}${clear}"
|
else
|
||||||
string+="${colon_color}: ${info_color}${output}"
|
string="${bold}${subtitle_color}${1}${clear}"
|
||||||
length=$((${#subtitle} + ${#output} + 1))
|
string+="${colon_color}: ${info_color}${2}"
|
||||||
;;
|
length=$((${#subtitle} + ${#2} + 1))
|
||||||
|
fi
|
||||||
*)
|
|
||||||
string="${info_color}${1}"
|
|
||||||
length=${#1}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Print the info
|
# Print the info
|
||||||
printf "%b%s\n" "${padding}${string}${clear}"
|
printf "%b%s\n" "${padding}${string}${clear}"
|
||||||
|
|
Loading…
Reference in a new issue