mirror of https://github.com/lcpz/lain.git
alsabar: string.format use for preset.text in alsabar._notify
This commit is contained in:
parent
adc899ba1f
commit
91c1b804b9
|
@ -70,11 +70,9 @@ function alsabar.notify()
|
||||||
preset.title = alsabar.channel .. " - " .. alsabar._current_level .. "%"
|
preset.title = alsabar.channel .. " - " .. alsabar._current_level .. "%"
|
||||||
end
|
end
|
||||||
|
|
||||||
int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size)
|
local int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size)
|
||||||
preset.text = "["
|
preset.text = string.format("[%s%s]", string.rep("|", int),
|
||||||
.. string.rep("|", int)
|
string.rep(" ", alsabar.notifications.bar_size - int))
|
||||||
.. string.rep(" ", alsabar.notifications.bar_size - int)
|
|
||||||
.. "]"
|
|
||||||
|
|
||||||
if alsabar._notify ~= nil then
|
if alsabar._notify ~= nil then
|
||||||
alsabar._notify = naughty.notify ({
|
alsabar._notify = naughty.notify ({
|
||||||
|
|
Loading…
Reference in New Issue