From 5ec79cf617dd16520ad5014ee81d1187f2e3304b Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 2 Apr 2016 11:34:04 +1100 Subject: [PATCH] Prin format changes --- neofetch | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/neofetch b/neofetch index 16a09520..daf77c52 100755 --- a/neofetch +++ b/neofetch @@ -2220,21 +2220,15 @@ info () { # Prin {{{ prin () { - case "$1" in - *:*) - subtitle=${1%%:*} - output=${1#*: } + if [ -z "$2" ]; then + string="${info_color}${1}" + length=${#1} - string="${bold}${subtitle_color}${subtitle}${clear}" - string+="${colon_color}: ${info_color}${output}" - length=$((${#subtitle} + ${#output} + 1)) - ;; - - *) - string="${info_color}${1}" - length=${#1} - ;; - esac + else + string="${bold}${subtitle_color}${1}${clear}" + string+="${colon_color}: ${info_color}${2}" + length=$((${#subtitle} + ${#2} + 1)) + fi # Print the info printf "%b%s\n" "${padding}${string}${clear}"