commit aec1c09d4736a19a80a768f9ea017416fae05ca4 parent cc127ae861addc9f1ac476d764fb682605b77409 Author: clamiax <smoppy@gmail.com> Date: Tue, 15 Oct 2013 22:56:34 +0200 Refine var/func names and output. Diffstat:
M | dwmstatus | | | 12 | ++++++------ |
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dwmstatus b/dwmstatus @@ -24,16 +24,16 @@ getdate() { date +'%d/%m/%Y %H:%M' } -getfreq() { +getfreqs() { freqs=$(cat /sys/devices/system/cpu/*/cpufreq/scaling_cur_freq) - freq="" + ret="" for f in $freqs do f="0.$(echo "$f / 10000" |bc)" - [ -z "$freq" ] && freq=$f || freq="${freq} $f" + [ -z "$ret" ] && ret=$f || ret="${ret} $f" done - echo $freq + echo $ret } gettemp() { @@ -47,10 +47,10 @@ main() { battery=$(getbattery) iwlink=$(getiwlink wlan0) date=$(getdate) - freq=$(getfreq) + freqs=$(getfreqs) temp=$(gettemp) - status="F:[$freq] B:$battery T:$temp W:$iwlink $date" + status="B:$battery T:$temp W:$iwlink ($freqs) $date" echo "$status" }