local wibox = require("wibox")
local math = { modf = math.modf }
-local mouse = mouse
local string = { format = string.format,
match = string.match,
rep = string.rep }
font = beautiful.font:sub(beautiful.font:find(""), beautiful.font:find(" ")),
font_size = "11",
color = beautiful.fg_normal,
- bar_size = 18,
screen = 1
},
preset.title = string.format("%s - %s%%", alsabar.channel, alsabar._current_level)
end
- int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size)
+ int = math.modf((alsabar._current_level / 100) * awful.screen.focused().mywibox.height)
preset.text = string.format("[%s%s]", string.rep("|", int),
- string.rep(" ", alsabar.notifications.bar_size - int))
+ string.rep(" ", awful.screen.focused().mywibox.height - int))
- if alsabar.followmouse then
- preset.screen = mouse.screen
+ if alsabar.followtag then
+ preset.screen = awful.screen.focused()
end
if alsabar._notify ~= nil then
alsabar.step = args.step or alsabar.step
alsabar.colors = args.colors or alsabar.colors
alsabar.notifications = args.notifications or alsabar.notifications
- alsabar.followmouse = args.followmouse or false
+ alsabar.followtag = args.followtag or false
alsabar.bar = wibox.widget {
forced_height = height,
end),
awful.button({}, 2, function()
awful.util.spawn(string.format("%s set %s 100%%", alsabar.cmd, alsabar.channel))
- pulsebar.update()
+ alsabar.update()
end),
awful.button({}, 3, function()
awful.util.spawn(string.format("%s set %s toggle", alsabar.cmd, alsabar.togglechannel or alsabar.channel))