Added test popup

master
Mark 2022-07-16 21:26:41 -07:00
parent 6c2443a79c
commit 3c3d12f7d1
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 27 additions and 0 deletions

View File

@ -114,12 +114,39 @@ function P:new()
}
widget.popup_widget = wibox.widget {
text = "A popup",
--forced_height = 100,
widget = wibox.widget.textbox
}
widget.popup = awful.popup {
widget = widget.popup_widget,
border_color = "#00ff00",
border_width = 0,
placement = function(client)
return awful.placement.next_to(client, {
honor_workarea = true,
preferred_positions = "top",
preferred_anchors = "front",
})
end,
shape = gears.shape.rounded_rect,
visible = false,
ontop = true
}
widget.widget:connect_signal("mouse::enter", function(result)
widget.widget.bg = beautiful.color.bar.hover_bg
--widget.popup.visible = true
widget.popup:move_next_to(result)
widget.popup_widget.text = "t"
--debug_message(result)
end)
widget.widget:connect_signal("mouse::leave", function(result)
widget.widget.bg = beautiful.color.transparent
widget.popup.visible = false
end)
return widget