chore: generate wallpaper from xresources
This commit is contained in:
parent
5c79d6362e
commit
ce7910508a
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
|
@ -1,19 +1,19 @@
|
||||||
------------------------------------------
|
--------------------------------------------
|
||||||
-- Aesthetic Night awesomewm theme --
|
--- Aesthetic Night awesomewm theme ---
|
||||||
-- Created by https://github.com/rxyhn --
|
--- Created by https://github.com/rxyhn ---
|
||||||
------------------------------------------
|
--------------------------------------------
|
||||||
|
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local xresources = require("beautiful.xresources")
|
local xresources = require("beautiful.xresources")
|
||||||
local rnotification = require("ruled.notification")
|
local rnotification = require("ruled.notification")
|
||||||
local dpi = xresources.apply_dpi
|
local dpi = xresources.apply_dpi
|
||||||
|
|
||||||
local gfs = require("gears.filesystem")
|
local gears = require("gears")
|
||||||
|
local gfs = gears.filesystem
|
||||||
local themes_path = gfs.get_themes_dir()
|
local themes_path = gfs.get_themes_dir()
|
||||||
|
|
||||||
-- inherit default theme
|
-- inherit xresources theme:
|
||||||
local theme = dofile(themes_path .. "default/theme.lua")
|
local theme = dofile(themes_path .. "xresources/theme.lua")
|
||||||
-- load vector assets' generators for this theme
|
|
||||||
|
|
||||||
theme.font = "sans 8"
|
theme.font = "sans 8"
|
||||||
|
|
||||||
|
@ -55,8 +55,39 @@ theme.menu_width = dpi(100)
|
||||||
-- Notification
|
-- Notification
|
||||||
theme.notification_border_color = theme.border_color_active
|
theme.notification_border_color = theme.border_color_active
|
||||||
|
|
||||||
-- Wallpaper
|
-- Generate wallpaper:
|
||||||
theme.wallpaper = themes_path .. "night/background.png"
|
local wallpaper_bg = "#162026"
|
||||||
|
local wallpaper_fg = theme.fg_normal
|
||||||
|
local wallpaper_alt_fg = theme.fg_focus
|
||||||
|
|
||||||
|
local rsvg = pcall(function()
|
||||||
|
return require("lgi").Rsvg
|
||||||
|
end)
|
||||||
|
|
||||||
|
if rsvg then
|
||||||
|
local handle = require("lgi").Rsvg.Handle.new_from_file(themes_path .. "xresources/wallpaper.svg")
|
||||||
|
|
||||||
|
if handle then
|
||||||
|
handle:set_stylesheet([[
|
||||||
|
.normal {
|
||||||
|
fill: ]] .. wallpaper_fg .. [[;
|
||||||
|
}
|
||||||
|
.background {
|
||||||
|
fill: ]] .. wallpaper_bg .. [[;
|
||||||
|
stroke: ]] .. wallpaper_bg .. [[;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
fill: ]] .. wallpaper_alt_fg .. [[;
|
||||||
|
}
|
||||||
|
]])
|
||||||
|
|
||||||
|
theme.wallpaper = handle
|
||||||
|
end
|
||||||
|
else
|
||||||
|
gears.debug.print_warning("Could not load the wallpaper: librsvg is not installed.")
|
||||||
|
end
|
||||||
|
|
||||||
|
theme.wallpaper_bg = wallpaper_bg
|
||||||
|
|
||||||
-- Recolor Layout icons:
|
-- Recolor Layout icons:
|
||||||
theme = theme_assets.recolor_layout(theme, theme.fg_normal)
|
theme = theme_assets.recolor_layout(theme, theme.fg_normal)
|
||||||
|
|
Loading…
Reference in New Issue