X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/7d431ef9c41f66e885dbace27e0843395940f1bd..64540340dbe9071bc716c73ca4c90df14fdd6302:/widgets/pulsebar.lua diff --git a/widgets/pulsebar.lua b/widgets/pulsebar.lua index fc2951b..9bac521 100644 --- a/widgets/pulsebar.lua +++ b/widgets/pulsebar.lua @@ -13,6 +13,7 @@ local read_pipe = require("lain.helpers").read_pipe local awful = require("awful") local beautiful = require("beautiful") local naughty = require("naughty") +local wibox = require("wibox") local math = { modf = math.modf } local mouse = mouse @@ -109,7 +110,7 @@ local function worker(args) pulsebar.step = args.step or pulsebar.step pulsebar.followmouse = args.followmouse or false - pulsebar.bar = awful.widget.progressbar() + pulsebar.bar = wibox.widget.progressbar() pulsebar.bar:set_background_color(pulsebar.colors.background) pulsebar.bar:set_color(pulsebar.colors.unmute) @@ -156,6 +157,7 @@ local function worker(args) end), awful.button({}, 2, function() awful.util.spawn(string.format("pactl set-sink-volume %d 100%%", pulsebar.sink)) + pulsebar.update() end), awful.button({}, 3, function() awful.util.spawn(string.format("pactl set-sink-mute %d toggle", pulsebar.sink)) @@ -178,4 +180,4 @@ local function worker(args) return pulsebar end -eturn setmetatable(pulsebar, { __call = function(_, ...) return worker(...) end }) +return setmetatable(pulsebar, { __call = function(_, ...) return worker(...) end })