From 2d9f758dae4b490747531f953294f2f1139155e1 Mon Sep 17 00:00:00 2001
From: matt1432 <matt@nelim.org>
Date: Sat, 9 Sep 2023 13:45:14 -0400
Subject: [PATCH] fix(ags): make volume percent accurate

---
 config/ags/js/bar/audio.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/config/ags/js/bar/audio.js b/config/ags/js/bar/audio.js
index 43731f16..8ce5535a 100644
--- a/config/ags/js/bar/audio.js
+++ b/config/ags/js/bar/audio.js
@@ -34,7 +34,14 @@ const SpeakerPercentLabel = props => Label({
     if (!Audio.speaker)
       return;
 
-    label.label = `${Math.floor(Audio.speaker.volume * 100)}%`;
+    let vol = Math.floor(Audio.speaker.volume * 100);
+
+    if (vol == 0) {
+      label.label = vol + '%';
+    }
+    else {
+      label.label = vol + 1 + '%';
+    }
   }, 'speaker-changed']],
 });