53 lines
1.1 KiB
Lua
53 lines
1.1 KiB
Lua
local widget = {}
|
|
|
|
|
|
widget.icon = wibox.widget {
|
|
resize = true,
|
|
image = beautiful.icons.launcher,
|
|
widget = wibox.widget.imagebox
|
|
}
|
|
|
|
widget.widget = wibox.widget {
|
|
{
|
|
{ -- Right space
|
|
widget = wibox.widget.separator,
|
|
color = beautiful.color.transparent,
|
|
forced_width = beautiful.dpi(3)
|
|
},
|
|
{
|
|
widget.icon,
|
|
top = beautiful.dpi(2),
|
|
bottom = beautiful.dpi(2),
|
|
layout = wibox.container.margin,
|
|
},
|
|
{ -- Left space
|
|
widget = wibox.widget.separator,
|
|
color = beautiful.color.transparent,
|
|
forced_width = beautiful.dpi(3)
|
|
},
|
|
layout = wibox.layout.align.horizontal,
|
|
},
|
|
layout = wibox.container.background,
|
|
}
|
|
|
|
widget.widget:connect_signal("mouse::enter", function(result)
|
|
widget.widget.bg = beautiful.color.bar.hover_bg
|
|
|
|
end)
|
|
|
|
widget.widget:connect_signal("mouse::leave", function(result)
|
|
widget.widget.bg = beautiful.color.transparent
|
|
end)
|
|
|
|
widget.widget:connect_signal("button::press",
|
|
function(_, _, _, button, mods)
|
|
if (button == 1) then
|
|
bin.rofi.launcher()
|
|
end
|
|
end
|
|
)
|
|
|
|
wrapper.volume.commands:get(widget.update)
|
|
|
|
return widget.widget
|