diff options
-rw-r--r-- | widgets/pavolctld.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/widgets/pavolctld.lua b/widgets/pavolctld.lua index f59b27f..1c57bb9 100644 --- a/widgets/pavolctld.lua +++ b/widgets/pavolctld.lua @@ -10,9 +10,9 @@ local lgi = require("lgi") local Gio = lgi.Gio -- return table -local widget = { - textbox = wibox.widget.textbox() -} +local widget = {} +widget.textbox = wibox.widget.textbox() +widget.tooltip = awful.tooltip { objects = {widget.textbox}, delay_show = 1 } -- start subprocess local p = Gio.Subprocess.new({ "pavolctld" }, Gio.SubprocessFlags.STDIN_PIPE + Gio.SubprocessFlags.STDOUT_PIPE) @@ -71,6 +71,7 @@ awful.spawn.read_lines(stdout, function(s) local f = tonumber(s:sub(2)) sinks.default = sinks.get(f) widget.textbox:set_text(sinks.default.vol) + widget.tooltip:set_text(sinks.default.desc) -- set command sink to default sink for now TODO change later pavolctld_cmd("s") -- sink removed |