Skip to content

Commit

Permalink
iii: use bright and dark colors
Browse files Browse the repository at this point in the history
  • Loading branch information
c00kiemon5ter committed Mar 19, 2013
1 parent cd68380 commit a38d202
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions iii.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ sepr='|'

# colors
reset="$(tput sgr0)"
black="$(tput setaf 8)"
yellow="$(tput setaf 11)"
darkcyan="$(tput setaf 6)"
dark="$(tput setaf 8)"
bright="$(tput setaf 3)"

# markup
sb="$(tput bold; tput setaf 9)"
Expand Down Expand Up @@ -57,17 +56,17 @@ do
then
unset clrdate clrnick clrsepr clrmesg

clrdate="${darkcyan}"
case "$line" in *"$n"*) clrdate="${yellow}" ;; esac
clrdate="${dark}"
case "$line" in *"$n"*) clrdate="${bright}" ;; esac

clrnick="$(printf '(%d ^ %d + %d)' "${#nick}" "'$nick" "'${nick#?}")"
clrnick="$(( clrnick % 14 + 1 ))"
clrnick="$(tput setaf "$clrnick")"

clrsepr="${darkcyan}"
clrsepr="${dark}"

clrmesg="${reset}"
[ "$nick" = '-!-' ] && clrmesg="${black}"
[ "$nick" = '-!-' ] && clrmesg="${dark}"

[ "${line#}" != "${line}" ] && clrmesg="${clrnick}"
fi
Expand Down

0 comments on commit a38d202

Please sign in to comment.