Reworked a whole lot. New config file and theme config file for easier changes. Did #19. And much more

This commit is contained in:
Kievits Rene
2022-06-14 06:33:33 +02:00
parent fd74ab9fb4
commit 521d392769
60 changed files with 2216 additions and 1450 deletions

View File

@@ -28,6 +28,8 @@ naughty.config.defaults.border_width = dpi(4)
naughty.config.defaults.border_color = color["Grey800"]
naughty.config.defaults.spacing = dpi(10)
Theme.notification_spacing = dpi(20)
naughty.connect_signal(
'request::icon',
function(n, context, hints)
@@ -44,7 +46,7 @@ naughty.connect_signal(
naughty.connect_signal(
"request::display",
function(n)
if user_vars.dnd then
if User_config.dnd then
n:destroy()
else
if n.urgency == "critical" then
@@ -89,6 +91,8 @@ naughty.connect_signal(
{
{
id = "icon_role",
valign = "center",
halign = "center",
widget = wibox.widget.imagebox
},
id = "centered",
@@ -179,6 +183,8 @@ naughty.connect_signal(
{
image = gears.color.recolor_image(icondir .. "notification-outline.svg", color["Teal200"]),
resize = false,
valign = "center",
halign = "center",
widget = wibox.widget.imagebox
},
right = dpi(5),
@@ -214,7 +220,7 @@ naughty.connect_signal(
{
{
{
font = user_vars.font.specify .. ", 10",
font = User_config.font.specify .. ", 10",
text = "",
align = "center",
valign = "center",
@@ -262,6 +268,8 @@ naughty.connect_signal(
image = n.icon,
resize = true,
widget = wibox.widget.imagebox,
valign = "center",
halign = "center",
clip_shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end
@@ -328,7 +336,8 @@ naughty.connect_signal(
widget = wibox.container.background
}
local close = w_template.max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_app_layout_2.arc_margin.const.background
local close = w_template.max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_app_layout_2.arc_margin.
const.background
local arc = close.arc_chart
local timeout = n.timeout

View File

@@ -39,14 +39,37 @@ awful.rules.rules = {
"pop-up"
}
},
properties = { floating = true, titlebars_enabled = true }
properties = {
floating = true,
titlebars_enabled = true
}
},
{
id = "titlebar",
rule_any = {
type = { "normal", "dialog", "modal", "utility" }
type = {
"normal",
"dialog",
"modal",
"utility"
}
},
properties = { titlebars_enabled = true }
properties = {
titlebars_enabled = true
}
},
rule_any = {
class = {
'Wine',
'dolphin-emu',
'Steam',
'Citra',
},
name = { 'Steam' }
},
properties = {
skip_decoration = true,
placement = awful.placement.centered
}
}

View File

@@ -1,9 +1,7 @@
---@diagnostic disable: undefined-field
-- Awesome Libs
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
local wibox = require("wibox")
screen.connect_signal(
"added",
@@ -50,8 +48,8 @@ client.connect_signal(
end
)
client.connect_signal(
'tag::switched',
tag.connect_signal(
'property::selected',
function(c)
if #awful.screen.focused().clients > 0 then
awful.screen.focused().clients[1]:emit_signal(
@@ -79,22 +77,6 @@ client.connect_signal(
end
)
-- Workaround for focused border color, why in the love of god doesnt it work with
-- beautiful.border_focus
client.connect_signal(
"focus",
function(c)
c.border_color = "#616161"
end
)
client.connect_signal(
"unfocus",
function(c)
c.border_color = beautiful.border_normal
end
)
--- Takes a wibox.container.background and connects four signals to it
---@param widget widget.container.background
---@param bg string