mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-23 18:28:34 +02:00
Initial commit.
This commit is contained in:
commit
c130561cb7
17 changed files with 1029 additions and 0 deletions
25
rc/wallpaper.lua
Normal file
25
rc/wallpaper.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
-- Change wallpaper
|
||||
|
||||
local wtimer = timer { timeout = 0 }
|
||||
|
||||
config.wallpaper = {}
|
||||
config.wallpaper.directory = awful.util.getdir("config") .. "/wallpapers"
|
||||
config.wallpaper.current = awful.util.getdir("cache") .. "/current-wallpaper.png"
|
||||
|
||||
-- We use fvwm-root because default backend for awsetbg does not seem
|
||||
-- to accept to set multiscreen wallpapers.
|
||||
local change = function()
|
||||
awful.util.spawn_with_shell(
|
||||
awful.util.getdir("config") .. "/bin/build-wallpaper " ..
|
||||
"--crop --directory " .. config.wallpaper.directory ..
|
||||
" --target " .. config.wallpaper.current ..
|
||||
"&& fvwm-root -r " .. config.wallpaper.current)
|
||||
end
|
||||
|
||||
wtimer:add_signal("timeout", function()
|
||||
change()
|
||||
wtimer:stop()
|
||||
wtimer.timeout = math.random(3000, 3600)
|
||||
wtimer:start()
|
||||
end)
|
||||
wtimer:start()
|
Loading…
Add table
Add a link
Reference in a new issue