Change default font, enable border, change icon size, fix focus on maximized/fullscreen

This commit is contained in:
Hydroxycarbamide 2022-08-28 23:28:42 +02:00
parent 093dec7f93
commit ca0c2a244c
5 changed files with 23 additions and 21 deletions

View file

@ -11,6 +11,7 @@ return gears.table.join(
function(c)
c.fullscreen = not c.fullscreen
c:raise()
client.emit_signal("tag::switched")
end,
{ description = "Toggle fullscreen", group = "Client" }
),
@ -40,6 +41,7 @@ return gears.table.join(
function(c)
c.maximized = not c.maximized
c:raise()
client.emit_signal("tag::switched")
end,
{ description = "(un)maximize", group = "Client" }
),

View file

@ -15,7 +15,7 @@ local icondir = awful.util.getdir("config") .. "src/assets/icons/notifications/"
-- TODO: Figure out how to use hover effects without messing up the actions
naughty.config.defaults.ontop = true
naughty.config.defaults.icon_size = dpi(80)
naughty.config.defaults.icon_size = dpi(32)
naughty.config.defaults.timeout = 3
naughty.config.defaults.title = "System Notification"
naughty.config.defaults.margin = dpi(10)
@ -44,16 +44,16 @@ naughty.connect_signal(
"request::display",
function(n)
if n.urgency == "critical" then
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>",
n.title = string.format("<span foreground='%s' font='Google Sans, ExtraBold 12'>%s</span>",
color["RedA200"], n.title) or ""
n.message = string.format("<span foreground='%s'>%s</span>", color["Red200"], n.message) or ""
n.app_name = string.format("<span foreground='%s'>%s</span>", color["RedA400"], n.app_name) or ""
n.bg = cat["Base"]
n.message = string.format("<span foreground='%s' font='Google Sans 12'>%s</span>", color["Red200"], n.message) or ""
n.app_name = string.format("<span foreground='%s' font='Google Sans, ExtraBold 12'>%s</span>", color["RedA400"], n.app_name) or ""
n.bg = cat["Surface0"]
else
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>",
n.title = string.format("<span foreground='%s' font='Google Sans, ExtraBold 12'>%s</span>",
color["Pink200"], n.title) or ""
n.message = string.format("<span foreground='%s'>%s</span>", "#ffffffaa", n.message) or ""
n.bg = cat["Base"]
n.message = string.format("<span foreground='%s' font='Google Sans 12'>%s</span>", "#ffffffaa", n.message) or ""
n.bg = cat["Surface0"]
n.timeout = n.timeout or 3
end
@ -117,7 +117,7 @@ naughty.connect_signal(
{
{
id = "text_role",
font = "JetBrainsMono Nerd Font, Regular 12",
font = "Google Sans, Regular 12",
widget = wibox.widget.textbox
},
id = "centered",
@ -221,7 +221,7 @@ naughty.connect_signal(
},
id = "background",
fg = color["Teal200"],
bg = cat["Base"],
bg = cat["Surface0"],
widget = wibox.container.background
},
strategy = "exact",
@ -242,7 +242,7 @@ naughty.connect_signal(
},
id = "arc_app_bg",
border_color = cat["Surface1"],
border_width = dpi(2),
border_width = dpi(0),
widget = wibox.container.background
},
{
@ -310,11 +310,11 @@ naughty.connect_signal(
widget = wibox.container.constraint
},
id = "background",
bg = cat["Base"],
bg = cat["Surface0"],
border_color = cat["Surface1"],
border_width = dpi(2),
border_width = dpi(0),
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 8)
gears.shape.rounded_rect(cr, width, height, 12)
end,
widget = wibox.container.background
}
@ -355,7 +355,7 @@ naughty.connect_signal(
)
end
Hover_signal(close, cat["Base"], color["Teal200"])
Hover_signal(close, cat["Surface0"], color["Teal200"])
close:connect_signal(
"button::press",

View file

@ -93,7 +93,7 @@ client.connect_signal(
client.connect_signal(
"focus",
function(c)
c.border_color = "#a6e3a1"
c.border_color = "#fab387"
end
)

View file

@ -27,7 +27,7 @@ Theme.fg_urgent = cat["Text"]
Theme.fg_minimize = cat["Text"]
Theme.useless_gap = dpi(5) -- Change this to 0 if you dont like window gaps
Theme.border_width = dpi(0) -- Change this to 0 if you dont like borders
Theme.border_width = dpi(2) -- Change this to 0 if you dont like borders
Theme.border_normal = cat["Base"]
--Theme.border_focus = color["Red"] -- Doesnt work, no idea why; workaround is in signals.lua
Theme.border_marked = cat["Red"]

View file

@ -54,10 +54,10 @@ user_vars = {
-- Set your font with this format:
font = {
regular = "JetBrainsMono Nerd Font, 14",
bold = "JetBrainsMono Nerd Font, bold 14",
extrabold = "JetBrainsMono Nerd Font, ExtraBold 14",
specify = "JetBrainsMono Nerd Font"
regular = "Google Sans, 14",
bold = "Google Sans, bold 14",
extrabold = "Google Sans, ExtraBold 14",
specify = "Google Sans"
},
-- This is your default Terminal