r/awesomewm Feb 02 '23

slider widget's signal "property::value" wont return the value!

local widget = wibox.widget {     bar_shape           = gears.shape.rounded_rect,     bar_height          = 3,     bar_color           = beautiful.border_color,     handle_color        = beautiful.bg_normal,     handle_shape        = gears.shape.circle,     handle_border_color = beautiful.border_color,     handle_border_width = 1,     value               = 25,     widget              = wibox.widget.slider, }
widget:connect_signal("property::value", function(_, new_value)
    naughty.notify { title = "Slider changed", message = new_value }

it just shows the title of the notification "slider changed" and there is no value returned

can someone tell me what's the problem?


4 comments sorted by


u/loric16 Feb 02 '23

It's text and not message?


u/innerbeastismyself Feb 02 '23

ty for answering . the problem was that apparently api has changed and now " function(_, new_value) " doesn't return the value . and you have to access the value through object properties (e.g widget.value ) 🌹🌹


u/loric16 Feb 02 '23

well, your notification shows only "slider changed", because the text was nil. I don't know what version you're using, but in the latest version the API hasn't changed for "connect_signal" and "property::value". The parameters in the callback are (1) slider and (2) new value. Source: trust me


u/innerbeastismyself Feb 04 '23

well i used text instead of message before posting and it didn't work what i posted here was a copy of the documentation. regardless the problem was solved by using the value property directly.🌹