From ca0c2a244c46d1745fdf0cbf6ac606c46c036356 Mon Sep 17 00:00:00 2001 From: Hydroxycarbamide Date: Sun, 28 Aug 2022 23:28:42 +0200 Subject: [PATCH] Change default font, enable border, change icon size, fix focus on maximized/fullscreen --- mappings/client_keys.lua | 2 ++ src/core/notifications.lua | 30 +++++++++++++++--------------- src/core/signals.lua | 2 +- src/theme/theme_variables.lua | 2 +- src/theme/user_variables.lua | 8 ++++---- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/mappings/client_keys.lua b/mappings/client_keys.lua index 20c0e2e..f311051 100644 --- a/mappings/client_keys.lua +++ b/mappings/client_keys.lua @@ -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" } ), diff --git a/src/core/notifications.lua b/src/core/notifications.lua index 0c2d602..0c53685 100644 --- a/src/core/notifications.lua +++ b/src/core/notifications.lua @@ -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("%s", + n.title = string.format("%s", color["RedA200"], n.title) or "" - n.message = string.format("%s", color["Red200"], n.message) or "" - n.app_name = string.format("%s", color["RedA400"], n.app_name) or "" - n.bg = cat["Base"] + n.message = string.format("%s", color["Red200"], n.message) or "" + n.app_name = string.format("%s", color["RedA400"], n.app_name) or "" + n.bg = cat["Surface0"] else - n.title = string.format("%s", + n.title = string.format("%s", color["Pink200"], n.title) or "" - n.message = string.format("%s", "#ffffffaa", n.message) or "" - n.bg = cat["Base"] + n.message = string.format("%s", "#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", diff --git a/src/core/signals.lua b/src/core/signals.lua index bcafff0..136cbcf 100644 --- a/src/core/signals.lua +++ b/src/core/signals.lua @@ -93,7 +93,7 @@ client.connect_signal( client.connect_signal( "focus", function(c) - c.border_color = "#a6e3a1" + c.border_color = "#fab387" end ) diff --git a/src/theme/theme_variables.lua b/src/theme/theme_variables.lua index e0b7411..83f99ae 100644 --- a/src/theme/theme_variables.lua +++ b/src/theme/theme_variables.lua @@ -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"] diff --git a/src/theme/user_variables.lua b/src/theme/user_variables.lua index 616381b..3238518 100644 --- a/src/theme/user_variables.lua +++ b/src/theme/user_variables.lua @@ -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