mirror of https://github.com/lcpz/lain.git
{alsa,pulse}bar: show percentage even when muted
This commit is contained in:
parent
a5b05fa479
commit
12f0258dc8
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue