Add Theming for Naughty Notifications

This commit is contained in:
Sravan Balaji
2023-03-26 19:39:21 -04:00
parent 3630ca4c1a
commit c5bfbfd4b1
2 changed files with 38 additions and 0 deletions

View File

@@ -815,6 +815,8 @@ local dpi = xresources.apply_dpi
local xrdb = xresources.get_current_theme() local xrdb = xresources.get_current_theme()
local gfs = require("gears.filesystem") local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir() local themes_path = gfs.get_themes_dir()
local shape = require("gears.shape")
local naughty = require("naughty")
-- inherit default theme -- inherit default theme
local theme = dofile(themes_path.."default/theme.lua") local theme = dofile(themes_path.."default/theme.lua")
@@ -828,6 +830,11 @@ local border_size = dpi(2)
local menu_height = dpi(20) local menu_height = dpi(20)
local menu_width = dpi(200) local menu_width = dpi(200)
local taglist_square_size = dpi(5) local taglist_square_size = dpi(5)
local notification_border_color = xrdb.color2
local notification_shape = shape.rounded_rect
local notification_max_width = dpi(700)
local notification_max_height = dpi(125)
local notification_icon_size = dpi(125)
theme.font = font .. " " .. tostring(font_size) theme.font = font .. " " .. tostring(font_size)
@@ -849,6 +856,18 @@ theme.border_focus = theme.bg_focus
theme.border_marked = xrdb.color10 theme.border_marked = xrdb.color10
theme.gap_single_client = true theme.gap_single_client = true
theme.notification_font = font
theme.notification_bg = xrdb.background
theme.notification_fg = xrdb.foreground
theme.notification_border_width = border_size
theme.notification_border_color = notification_border_color
theme.notification_shape = notification_shape
-- theme.notification_opacity
theme.notification_margin = gap_size
theme.notification_max_width = notification_max_width
theme.notification_max_height = notification_max_height
theme.notification_icon_size = notification_icon_size
-- There are other variable sets -- There are other variable sets
-- overriding the default one when -- overriding the default one when
-- defined, the sets are: -- defined, the sets are:

View File

@@ -4,6 +4,8 @@ local dpi = xresources.apply_dpi
local xrdb = xresources.get_current_theme() local xrdb = xresources.get_current_theme()
local gfs = require("gears.filesystem") local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir() local themes_path = gfs.get_themes_dir()
local shape = require("gears.shape")
local naughty = require("naughty")
-- inherit default theme -- inherit default theme
local theme = dofile(themes_path.."default/theme.lua") local theme = dofile(themes_path.."default/theme.lua")
@@ -17,6 +19,11 @@ local border_size = dpi(2)
local menu_height = dpi(20) local menu_height = dpi(20)
local menu_width = dpi(200) local menu_width = dpi(200)
local taglist_square_size = dpi(5) local taglist_square_size = dpi(5)
local notification_border_color = xrdb.color2
local notification_shape = shape.rounded_rect
local notification_max_width = dpi(700)
local notification_max_height = dpi(125)
local notification_icon_size = dpi(125)
theme.font = font .. " " .. tostring(font_size) theme.font = font .. " " .. tostring(font_size)
@@ -38,6 +45,18 @@ theme.border_focus = theme.bg_focus
theme.border_marked = xrdb.color10 theme.border_marked = xrdb.color10
theme.gap_single_client = true theme.gap_single_client = true
theme.notification_font = font
theme.notification_bg = xrdb.background
theme.notification_fg = xrdb.foreground
theme.notification_border_width = border_size
theme.notification_border_color = notification_border_color
theme.notification_shape = notification_shape
-- theme.notification_opacity
theme.notification_margin = gap_size
theme.notification_max_width = notification_max_width
theme.notification_max_height = notification_max_height
theme.notification_icon_size = notification_icon_size
-- There are other variable sets -- There are other variable sets
-- overriding the default one when -- overriding the default one when
-- defined, the sets are: -- defined, the sets are: