{alsa,pulse}bar: show percentage even when muted
This commit is contained in:
parent
a5b05fa479
commit
12f0258dc8
2 changed files with 6 additions and 6 deletions
|
@ -107,11 +107,11 @@ local function factory(args)
|
||||||
function alsabar.notify()
|
function alsabar.notify()
|
||||||
alsabar.update(function()
|
alsabar.update(function()
|
||||||
local preset = alsabar.notification_preset
|
local preset = alsabar.notification_preset
|
||||||
|
|
||||||
|
preset.title = string.format("%s - %s%%", alsabar.channel, alsabar._current_level)
|
||||||
|
|
||||||
if alsabar._playback == "off" then
|
if alsabar._playback == "off" then
|
||||||
preset.title = string.format("%s - Muted", alsabar.channel)
|
preset.title = preset.title .. " Muted"
|
||||||
else
|
|
||||||
preset.title = string.format("%s - %s%%", alsabar.channel, alsabar._current_level)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
int = math.modf((alsabar._current_level / 100) * awful.screen.focused().mywibox.height)
|
int = math.modf((alsabar._current_level / 100) * awful.screen.focused().mywibox.height)
|
||||||
|
|
|
@ -118,11 +118,11 @@ local function factory(args)
|
||||||
function pulsebar.notify()
|
function pulsebar.notify()
|
||||||
pulsebar.update(function()
|
pulsebar.update(function()
|
||||||
local preset = pulsebar.notification_preset
|
local preset = pulsebar.notification_preset
|
||||||
|
|
||||||
|
preset.title = string.format("Sink %s - %s%%", pulsebar.sink, pulsebar._current_level)
|
||||||
|
|
||||||
if pulsebar._mute == "yes" then
|
if pulsebar._mute == "yes" then
|
||||||
preset.title = string.format("Sink %s - Muted", pulsebar.sink)
|
preset.title = preset.title .. " Muted"
|
||||||
else
|
|
||||||
preset.title = string.format("Sink %s - %s%%", pulsebar.sink, pulsebar._current_level)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
int = math.modf((pulsebar._current_level / 100) * awful.screen.focused().mywibox.height)
|
int = math.modf((pulsebar._current_level / 100) * awful.screen.focused().mywibox.height)
|
||||||
|
|
Loading…
Add table
Reference in a new issue