From 95939ecf82851d9c5e0ee05aa1307617e67df451 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 19 Oct 2024 00:57:57 -0500 Subject: volume default sink tooltip --- widgets/pavolctld.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'widgets') 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 -- cgit v1.2.3