converted all colors to theme_config.lua; fixed and added some bugs; rewrote some stuff and added some
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
--------------------------------------
|
||||
-- This is the application launcher --
|
||||
--------------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function()
|
||||
|
||||
local application_list = wibox.widget {
|
||||
homogenous = true,
|
||||
expand = false,
|
||||
spacing = dpi(10),
|
||||
layout = wibox.container.grid
|
||||
}
|
||||
|
||||
return application_list
|
||||
end
|
||||
|
||||
@@ -4,22 +4,58 @@
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local color = require("src.theme.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "src/assets/icons/application_launcher/"
|
||||
local application_grid = require("src.modules.application_launcher.application")()
|
||||
local searchbar = require("src.modules.application_launcher.searchbar")()
|
||||
|
||||
return function(s)
|
||||
|
||||
local applicaton_launcher = wibox.widget {
|
||||
|
||||
local applicaton_launcher = wibox.widget {
|
||||
{
|
||||
{
|
||||
searchbar,
|
||||
wibox.widget.inputtextbox,
|
||||
application_grid,
|
||||
layout = wibox.layout.fixed.vertical
|
||||
},
|
||||
margins = dpi(20),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
height = dpi(600),
|
||||
width = dpi(800),
|
||||
strategy = "exact",
|
||||
widget = wibox.container.constraint
|
||||
}
|
||||
|
||||
local application_container = awful.popup {
|
||||
|
||||
widget = wibox.container.background,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
stretch = false,
|
||||
screen = s,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, dpi(12))
|
||||
end,
|
||||
placement = awful.placement.centered,
|
||||
bg = Theme_config.application_launcher.bg,
|
||||
border_color = Theme_config.application_launcher.border_color,
|
||||
border_width = Theme_config.application_launcher.border_width
|
||||
}
|
||||
|
||||
application_container:setup {
|
||||
applicaton_launcher,
|
||||
layout = wibox.layout.fixed.vertical
|
||||
}
|
||||
|
||||
awesome.connect_signal(
|
||||
"application_laucher::show",
|
||||
function()
|
||||
application_container.visible = not application_container.visible
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
-------------------------------------------------------
|
||||
-- This is the seachbar for the application launcher --
|
||||
-------------------------------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
local icondir = awful.util.getdir("config") .. "src/assets/icons/application_launcher/searchbar/"
|
||||
|
||||
return function()
|
||||
|
||||
local searchbar = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{ -- Search icon
|
||||
{
|
||||
resize = false,
|
||||
image = icondir .. "search.svg",
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
strategy = "exact",
|
||||
widget = wibox.container.constraint
|
||||
},
|
||||
{
|
||||
fg = Theme_config.application_launcher.searchbar.fg_hint,
|
||||
text = "Search",
|
||||
valign = "center",
|
||||
align = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
widget = wibox.layout.fixed.horizontal
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = Theme_config.application_launcher.searchbar.bg,
|
||||
fg = Theme_config.application_launcher.searchbar.fg,
|
||||
border_color = Theme_config.application_launcher.searchbar.border_color,
|
||||
border_width = Theme_config.application_launcher.searchbar.border_width,
|
||||
widget = wibox.container.background
|
||||
},
|
||||
width = dpi(400),
|
||||
height = dpi(40),
|
||||
strategy = "exact",
|
||||
widget = wibox.container.constraint
|
||||
}
|
||||
|
||||
return searchbar
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user