From 12f0258dc82b8a1affa3a32549d3aabc62f6cada Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Fri, 25 Aug 2017 10:26:30 +0200 Subject: [PATCH] {alsa,pulse}bar: show percentage even when muted --- widget/alsabar.lua | 6 +++--- widget/pulsebar.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/widget/alsabar.lua b/widget/alsabar.lua index fb9c2e4..81fbe29 100644 --- a/widget/alsabar.lua +++ b/widget/alsabar.lua @@ -107,11 +107,11 @@ local function factory(args) function alsabar.notify() alsabar.update(function() local preset = alsabar.notification_preset + + preset.title = string.format("%s - %s%%", alsabar.channel, alsabar._current_level) if alsabar._playback == "off" then - preset.title = string.format("%s - Muted", alsabar.channel) - else - preset.title = string.format("%s - %s%%", alsabar.channel, alsabar._current_level) + preset.title = preset.title .. " Muted" end int = math.modf((alsabar._current_level / 100) * awful.screen.focused().mywibox.height) diff --git a/widget/pulsebar.lua b/widget/pulsebar.lua index 8914a4e..83bfe5e 100644 --- a/widget/pulsebar.lua +++ b/widget/pulsebar.lua @@ -118,11 +118,11 @@ local function factory(args) function pulsebar.notify() pulsebar.update(function() local preset = pulsebar.notification_preset + + preset.title = string.format("Sink %s - %s%%", pulsebar.sink, pulsebar._current_level) if pulsebar._mute == "yes" then - preset.title = string.format("Sink %s - Muted", pulsebar.sink) - else - preset.title = string.format("Sink %s - %s%%", pulsebar.sink, pulsebar._current_level) + preset.title = preset.title .. " Muted" end int = math.modf((pulsebar._current_level / 100) * awful.screen.focused().mywibox.height) -- 2.39.2