Fix lint errors

This commit is contained in:
Dylan 2016-03-30 10:14:34 +11:00
parent c9e6e7ada0
commit ec9bfefbf3

View file

@ -939,9 +939,9 @@ getcpu () {
case "$cpu_display" in case "$cpu_display" in
"info") prin "${subtitle} Usage: ${cpu_usage}" ;; "info") prin "${subtitle} Usage: ${cpu_usage}" ;;
"bar") prin "${subtitle} Usage: $(bar "${cpu_usage/'%'}" $(( 100 * ${cores} )))" ;; "bar") prin "${subtitle} Usage: $(bar "${cpu_usage/'%'}" $(( 100 * cores )))" ;;
"infobar") prin "${subtitle} Usage: ${cpu_usage} $(bar "${cpu_usage/'%'}" $(( 100 * ${cores} )))" ;; "infobar") prin "${subtitle} Usage: ${cpu_usage} $(bar "${cpu_usage/'%'}" $(( 100 * cores )))" ;;
"barinfo") prin "${subtitle} Usage: $(bar "${cpu_usage/'%'}" $(( 100 * ${cores} ))) ${cpu_usage}" ;; "barinfo") prin "${subtitle} Usage: $(bar "${cpu_usage/'%'}" $(( 100 * cores ))) ${cpu_usage}" ;;
esac esac
fi fi
[ "$stdout_mode" != "on" ] && unset cpu [ "$stdout_mode" != "on" ] && unset cpu
@ -1081,10 +1081,10 @@ getgpu () {
getmemory () { getmemory () {
case "$os" in case "$os" in
"Linux" | "Windows") "Linux" | "Windows")
mem=($(awk -F ':| kB' '/MemTotal|MemFree|Buffers|Cached/ {printf $2}' /proc/meminfo)) mem=($(awk -F ':| kB' '/MemTotal|MemFree|Buffers|Cached/ {printf $2}' /proc/meminfo) 0 0)
memused=$((${mem[0]} - ${mem[1]} - ${mem[2]:-0} - ${mem[3]:-0})) memused=$((mem[0] - mem[1] - mem[2] - mem[3]))
memused=$((memused / 1024)) memused=$((memused / 1024))
memtotal=$((${mem[0]} / 1024)) memtotal=$((mem[0] / 1024))
;; ;;
"Mac OS X") "Mac OS X")
@ -1845,7 +1845,7 @@ getascii () {
# Get length of longest line # Get length of longest line
ascii_size=($(awk 'END {print NR}length>max{max=length}END{print max}' <<< "$ascii_strip")) ascii_size=($(awk 'END {print NR}length>max{max=length}END{print max}' <<< "$ascii_strip"))
lines=$((${ascii_size[0]} + 1)) lines=$((ascii_size[0] + 1))
ascii_length=${ascii_size[1]} ascii_length=${ascii_size[1]}
padding="\033[$((ascii_length + gap))C" padding="\033[$((ascii_length + gap))C"