diff options
Diffstat (limited to 'pactl-widget/volume.lua')
-rw-r--r-- | pactl-widget/volume.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pactl-widget/volume.lua b/pactl-widget/volume.lua index 53441fd..1c3108c 100644 --- a/pactl-widget/volume.lua +++ b/pactl-widget/volume.lua @@ -157,6 +157,7 @@ local function worker(user_args) local refresh_rate = args.refresh_rate or 1 local step = args.step or 5 local device = args.device or '@DEFAULT_SINK@' + local tooltip = args.tooltip or false if widget_types[widget_type] == nil then volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args) @@ -226,6 +227,15 @@ local function worker(user_args) end } + if tooltip then + awful.tooltip { + objects = { volume.widget }, + timer_function = function() + return pactl.get_volume(device) .. " %" + end, + } + end + return volume.widget end |