diff options
-rw-r--r-- | pkgs/simple/q-power_supply.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/simple/q-power_supply.nix b/pkgs/simple/q-power_supply.nix index 7611edf..11597c1 100644 --- a/pkgs/simple/q-power_supply.nix +++ b/pkgs/simple/q-power_supply.nix @@ -123,7 +123,9 @@ writeDashBin "q-power_supply" '' out = out name out = out sprintf(" %s", print_bar(capacity)) out = out sprintf(" %d%", capacity) - out = out sprintf(" %.2f%s", charge_now, charge_unit) + if (charge_now != 0) { + out = out sprintf(" %.2f%s", charge_now, charge_unit) + } if (current_now != 0) { out = out sprintf("/%.1f%s", current_now, current_unit) } |