delta
f42a3a2cc9
add new icons, switch over to using stylesheets instead of gears.color.recolor_image, add a music widget to the panel, optimize services in common.lua, fix the application lense filtering and increase the update rate of services in common.lua Signed-off-by: delta <darkussdelta@gmail.com>
92 lines
2.2 KiB
Lua
92 lines
2.2 KiB
Lua
local btns = require "awful".button.names
|
|
local gears = require "gears"
|
|
local xresources = require "beautiful.xresources"
|
|
local x_col = xresources.get_current_theme()
|
|
local dpi = xresources.apply_dpi
|
|
local wibox = require "wibox"
|
|
|
|
local qvars = {}
|
|
|
|
qvars.anim_duration = 0.15
|
|
qvars.anim_intro = qvars.anim_duration / 4
|
|
|
|
qvars.notif_timeout = 3 + qvars.anim_duration * 2
|
|
|
|
function qvars.shape(cr,w,h)
|
|
gears.shape.rounded_rect(cr,w,h,dpi(4))
|
|
end
|
|
|
|
qvars.border_width = dpi(1.5)
|
|
|
|
qvars.padding = dpi(4)
|
|
qvars.big_padding = dpi(8)
|
|
|
|
qvars.text_font = "Fira Code Nerd Font Mono Medium"
|
|
qvars.font_size = 8
|
|
qvars.font = qvars.text_font .. " " .. qvars.font_size
|
|
|
|
local char_width, char_height = wibox.widget {
|
|
widget = wibox.widget.textbox,
|
|
text = "a"
|
|
}:get_preferred_size_at_dpi(screen[1].dpi)
|
|
|
|
qvars.char_height = char_height
|
|
qvars.char_width = char_width
|
|
|
|
qvars.bar_size = dpi(24) + qvars.big_padding * 2
|
|
qvars.element_size = dpi(12)
|
|
qvars.expanded_bar_size = qvars.big_padding + (qvars.big_padding * 2 + qvars.element_size * 4) * 3 + qvars.padding * 2
|
|
|
|
qvars.colors = {
|
|
fg = x_col.foreground,
|
|
bg = x_col.background,
|
|
|
|
black = x_col.color0,
|
|
red = x_col.color1,
|
|
green = x_col.color2,
|
|
yellow = x_col.color3,
|
|
blue = x_col.color4,
|
|
pink = x_col.color5,
|
|
cyan = x_col.color6,
|
|
white = x_col.color7,
|
|
|
|
bright = {
|
|
black = x_col.color8,
|
|
red = x_col.color9,
|
|
green = x_col.color10,
|
|
yellow = x_col.color11,
|
|
blue = x_col.color12,
|
|
pink = x_col.color13,
|
|
cyan = x_col.color14,
|
|
white = x_col.color15,
|
|
},
|
|
|
|
dim = {
|
|
fg = "#8893a5",
|
|
bg = "#20262e"
|
|
},
|
|
|
|
transparent = "#00000000"
|
|
}
|
|
|
|
-- taken from https://github.com/bew/dotfiles/blob/ab9bb1935783f7a31ef777b1d7e26d53f35df864/gui/wezterm/cfg_utils.lua
|
|
qvars.mods = setmetatable({ _SHORT_MAP = { C = "Control", S = "Shift", A = "Mod1", M = "Mod4" } }, {
|
|
__index = function(self, key)
|
|
local resolved_mods = {}
|
|
for i = 1, #key do
|
|
resolved_mods[i] = self._SHORT_MAP[key:sub(i, i)]
|
|
end
|
|
return resolved_mods
|
|
end
|
|
})
|
|
|
|
qvars.btns = {
|
|
left = btns.LEFT,
|
|
right = btns.RIGHT,
|
|
middle = btns.MIDDLE,
|
|
up = btns.SCROLL_UP,
|
|
down = btns.SCROLL_DOWN
|
|
}
|
|
|
|
return qvars
|