Minor cleanup

master
Mark 2022-11-05 08:16:41 -07:00
parent 03e9fbe124
commit b1c1c8faa6
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
2 changed files with 18 additions and 16 deletions

View File

@ -21,11 +21,11 @@ config.core = {
-- Dynamic: a table of files and times -- Dynamic: a table of files and times
-- {file = "path", start_time = {hour, minute}} -- {file = "path", start_time = {hour, minute}}
--[[ --[[
config.wallpaper = { wallpaper = {
{ file = "morning-file.png", start_time = {04, 00} }, { file = "morning-file.png", start_time = {04, 00} },
{ file = "noon-file.png", start_time = {11, 00} }, { file = "noon-file.png", start_time = {11, 00} },
{ file = "night-file.png", start_time = {19, 00} }, { file = "night-file.png", start_time = {19, 00} },
} },
]]-- ]]--
-- The position of the bar on each screen -- The position of the bar on each screen

View File

@ -54,20 +54,23 @@ local function start()
-- If timed wallpaper is enabled, load timed manager -- If timed wallpaper is enabled, load timed manager
if (type(beautiful.wallpaper) == "table") then if (type(beautiful.wallpaper) == "table") then
desktop.wallpaper = require("desktop.wallpaper") local wallpaper = require("core.wallpaper")
screen.connect_signal("property::geometry", desktop.wallpaper.update) screen.connect_signal(
desktop.wallpaper.update() "property::geometry",
desktop.wallpaper.start() wallpaper.update
)
wallpaper.update()
wallpaper.start()
else else
-- Otherwise, set a static wallpaper
-- Otherwise, set static wallpaper on each screen -- on each screen. We need to iterate
-- We loop over screens to prevent the wallpaper from being stretched over -- because a single call to wallpaper.maximized
-- all displays. If, for some reason, you want that to happen, use a single -- will stretch one image over all screens
-- call of "gears.wallpaper.maximized(beautiful.wallpaper)" instead of
-- this loop.
for s in screen do for s in screen do
gears.wallpaper.maximized(beautiful.wallpaper, s) gears.wallpaper.maximized(
beautiful.wallpaper,
s
)
end end
end end
@ -103,8 +106,7 @@ local function start()
-- Create tag table -- Create tag table
s.tagger = tagger:new(s) s.tagger = tagger:new(s)
-- Create a promptbox for each screen
-- Create a promptbox for each s
s.mypromptbox = awful.widget.prompt() s.mypromptbox = awful.widget.prompt()
-- Create the bar -- Create the bar