From: Siraaj Khandkar Date: Sat, 18 Aug 2018 14:29:13 +0000 (-0400) Subject: Simplify setting default volume symbol X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=767766df5d192448d99e6c292a8cc68f8074529c;p=khatus.git Simplify setting default volume symbol --- diff --git a/bin/khatus_bar b/bin/khatus_bar index bf151b8..a3601f2 100755 --- a/bin/khatus_bar +++ b/bin/khatus_bar @@ -261,6 +261,7 @@ function make_status_volume( sink, mu, vl, vr, show) { cache_get(mu, "khatus_sensor_volume", "mute" Kfs sink, 5) cache_get(vl, "khatus_sensor_volume", "vol_left" Kfs sink, 5) cache_get(vr, "khatus_sensor_volume", "vol_right" Kfs sink, 5) + show = "--" if (!mu["is_expired"] && !vl["is_expired"] && !vr["is_expired"]) { if (mu["value"] == "yes") {show = "X"} else if (mu["value"] == "no") {show = vl["value"] " " vr["value"]} @@ -269,10 +270,7 @@ function make_status_volume( sink, mu, vl, vr, show) { "make_status_volume", \ "Unexpected value for 'mute' field: " mu["value"] \ ) - show = "--" } - } else { - show = "--" } return sprintf("(%s)", show) }