Added launcher module

This commit is contained in:
2022-07-16 16:20:58 -07:00
parent a4f80add9e
commit 13b39f0953
6 changed files with 20 additions and 4 deletions

View File

@ -8,7 +8,7 @@ local desktop = {
keymap = modules.ibus.widgets.ibus,
volume = modules.volume.widgets.volume,
tagindicator = require("desktop.widgets.tagindicator"),
launcher = require("desktop.widgets.launcher"),
launcher = modules.launcher.widgets.launcher,
shortcut = require("desktop.widgets.shortcut"),
space = function(size)

View File

@ -1,49 +0,0 @@
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
)
return widget.widget