diff options
author | P. J. McDermott <pj@pehjota.net> | 2018-04-26 19:07:56 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2018-04-26 19:07:56 (EDT) |
commit | 02ad576f3236b4973aeed906a8a9b08753035196 (patch) | |
tree | ca1071c88669a1c979801878ad9b30a7db158dff | |
parent | cea1e7fc49644c9dcc337663503c0b76a73a05af (diff) | |
download | fluxbox-02ad576f3236b4973aeed906a8a9b08753035196.zip fluxbox-02ad576f3236b4973aeed906a8a9b08753035196.tar.gz fluxbox-02ad576f3236b4973aeed906a8a9b08753035196.tar.bz2 |
bin/hwmon: Make labels optional
-rwxr-xr-x | bin/hwmon | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -170,15 +170,17 @@ print_sensor() printf ' ' i=$((${i} + 1)) done - printf '%s:' "${label}" - i=${#label} - while [ ${i} -lt ${len} ]; do - printf ' ' - i=$((${i} + 1)) - done + case "${label}" in ?*) + printf '%s: ' "${label}" + i=${#label} + while [ ${i} -lt ${len} ]; do + printf ' ' + i=$((${i} + 1)) + done + esac case "${cr}" in - 1) printf ' %s\r' "${value}";; - 0) printf ' %s\n' "${value}";; + 1) printf '%s\r' "${value}";; + 0) printf '%s\n' "${value}";; esac return 0 |