{alsa,pulse}bar: show percentage even when muted

This commit is contained in:
Luke Bonham 2017-08-25 10:26:30 +02:00
parent a5b05fa479
commit 12f0258dc8
2 changed files with 6 additions and 6 deletions

View File

@ -108,10 +108,10 @@ local function factory(args)
alsabar.update(function()
local preset = alsabar.notification_preset
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)
if alsabar._playback == "off" then
preset.title = preset.title .. " Muted"
end
int = math.modf((alsabar._current_level / 100) * awful.screen.focused().mywibox.height)

View File

@ -119,10 +119,10 @@ local function factory(args)
pulsebar.update(function()
local preset = pulsebar.notification_preset
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)
if pulsebar._mute == "yes" then
preset.title = preset.title .. " Muted"
end
int = math.modf((pulsebar._current_level / 100) * awful.screen.focused().mywibox.height)