[volume-widget] fix #118

This commit is contained in:
streetturtle 2020-02-22 13:35:22 -05:00
parent 83376adcfa
commit 88e7d9ac99
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ It is possible to customize widget by providing a table with all or some of the
| Name | Default | Description |
|---|---|---|
| `volume_audio_controller` | `pulse` | audio device |
| `notification` | `false` | Display a notification on mouseover |
| `display_notification` | `false` | Display a notification on mouseover |
| `notification_position` | `top_right` | The notification position |
## Installation

View File

@ -24,7 +24,7 @@ local function worker(args)
local args = args or {}
local volume_audio_controller = args.volume_audio_controller or 'pulse'
local display_notification = args.notification or 'false'
local display_notification = args.display_notification or false
local position = args.notification_position or "top_right"
local device_arg = ''
if volume_audio_controller == 'pulse' then
@ -125,6 +125,7 @@ local function worker(args)
volume_widget:connect_signal("mouse::enter", function() show_volume(volume_icon_name) end)
volume_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
end
watch(GET_VOLUME_CMD, 1, update_graphic, volume_widget)
return volume_widget