summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-19 00:57:57 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-19 00:57:57 -0500
commit95939ecf82851d9c5e0ee05aa1307617e67df451 (patch)
treeb83b3ba1ce941fc1a856fb7562d63b88792425b1
parentd36142293084f6e677427022da56cd9e58f1f15f (diff)
downloadawesome-95939ecf82851d9c5e0ee05aa1307617e67df451.tar.xz
awesome-95939ecf82851d9c5e0ee05aa1307617e67df451.zip
volume default sink tooltip
-rw-r--r--widgets/pavolctld.lua7
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