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
-- {file = "path", start_time = {hour, minute}}
--[[
config.wallpaper = {
wallpaper = {
{ file = "morning-file.png", start_time = {04, 00} },
{ file = "noon-file.png", start_time = {11, 00} },
{ file = "night-file.png", start_time = {19, 00} },
}
},
]]--
-- 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 (type(beautiful.wallpaper) == "table") then
desktop.wallpaper = require("desktop.wallpaper")
screen.connect_signal("property::geometry", desktop.wallpaper.update)
desktop.wallpaper.update()
desktop.wallpaper.start()
local wallpaper = require("core.wallpaper")
screen.connect_signal(
"property::geometry",
wallpaper.update
)
wallpaper.update()
wallpaper.start()
else
-- Otherwise, set static wallpaper on each screen
-- We loop over screens to prevent the wallpaper from being stretched over
-- all displays. If, for some reason, you want that to happen, use a single
-- call of "gears.wallpaper.maximized(beautiful.wallpaper)" instead of
-- this loop.
-- Otherwise, set a static wallpaper
-- on each screen. We need to iterate
-- because a single call to wallpaper.maximized
-- will stretch one image over all screens
for s in screen do
gears.wallpaper.maximized(beautiful.wallpaper, s)
gears.wallpaper.maximized(
beautiful.wallpaper,
s
)
end
end
@ -103,8 +106,7 @@ local function start()
-- Create tag table
s.tagger = tagger:new(s)
-- Create a promptbox for each s
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create the bar