tChanged colors - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 6c9d6017bc7710db148337c1ff1bebcc72f671e5
 (DIR) parent c38ea05fc0b1fa9554ba9efc8f749257fe337dbb
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Fri, 27 Jun 2014 14:20:21 +0200
       
       Changed colors
       
       Diffstat:
         M mkbar                               |      37 ++++++++++++++++---------------
       
       1 file changed, 19 insertions(+), 18 deletions(-)
       ---
 (DIR) diff --git a/mkbar b/mkbar
       t@@ -15,7 +15,7 @@
        
        # configuration variables
        refresh_rate=0.75               # how often will the bar update
       -datefmt="%H:%M - %d %b"         # date time format
       +datefmt="%d %b %H:%M"         # date time format
        maildir=~/var/mail/INBOX/new    # where do new mails arrive ?
        alsactl=Master                  # which alsa channel to display
        #battery=BAT0                    # battery index
       t@@ -23,12 +23,13 @@ alsactl=Master                  # which alsa channel to display
        battery=$(ls /sys/class/power_supply | grep BAT)
        
        barch=''
       -barfg='%{F#ffffffff}'
       -barbg='%{F#00333333}'
       +barfg='%{F#ff666666}'
       +barmg='%{F#ff2288cc}'
       +barbg='%{F#00888888}'
        
       -grpfg='%{F#fffff000} '
       -grpmg='%{F#ff666666} '
       -grpbg='%{F#00ffffff} '
       +grpfg='%{F#ff111111} '
       +grpmg='%{F#ff2288cc} '
       +grpbg='%{F#ffbbbbbb} '
        
        # no need to modify anything else here
        
       t@@ -119,7 +120,7 @@ groups() {
            for w in `seq 0 $((cur - 1))`; do line="${line}${grpbg}"; done
            line="${line}${grpfg}"
            for w in `seq $((cur + 2)) $tot`; do line="${line}${grpbg}"; done
       -    line="${line}%{F-}"
       +    line="${line}${barfg}"
        
            echo $line
        }
       t@@ -177,34 +178,34 @@ makebar() {
        buf="%{l} "
        
        # Set icon depending on the interface that is up
       -buf="${buf}%{F#ff49d4dd} "
       +buf="${buf}${barmg} "
        if test "$(netint)" = "eth0"; then
       -    buf="${buf}%{F-}"
       +    buf="${buf}${barfg}"
        elif test "$(netint)" = "wlan0"; then
       -    buf="${buf}%{F-}"
       +    buf="${buf}${barfg}"
        else
       -    buf="${buf}%{F-}"
       +    buf="${buf}${barfg}"
        fi
        buf="$buf $(netstate) "
        
       -buf="${buf}%{F#ffcef318} %{F-} $(nettrafic down) "
       -buf="${buf}%{F#ffd43f10} %{F-} $(nettrafic up) "
       +buf="${buf}${barmg} ${barfg} $(nettrafic down) "
       +buf="${buf}${barmg} ${barfg} $(nettrafic up) "
        buf="${buf}%{c} $(gstate)"
        buf="${buf}%{r}"
       -buf="${buf}%{F#ffede265} %{F-} $(mails) "
       +buf="${buf}${barmg} ${barfg} $(mails) "
        
        # Change icon if volume is muted
        if amixer get $alsactl | grep '\[off\]' >/dev/null; then
       -    buf="${buf}%{F#ffd43f10} %{F-} "
       +    buf="${buf}${barmg} ${barfg} "
        else
       -    buf="${buf}%{F#ff6ac0fd} %{F-} "
       +    buf="${buf}${barmg} ${barfg} "
        fi
        buf="${buf}$(makebar $(volume)) "
        
        # Show battery status if there is a battery (U DONT SAY)
        test -n "${battery}" &&
       -    buf="${buf}%{F#ffef79ae} %{F-} $(makebar $(battery)) "
       +    buf="${buf}${barmg} ${barfg} $(makebar $(battery)) "
        
       -buf="${buf}%{F#ffb3b3b3} %{F-} $(clock)  "
       +buf="${buf}${barmg} ${barfg} $(clock)  "
        echo $buf
        sleep ${refresh_rate}