Hi Max,
The slightly changed coldes below only let the timer timeout once, no
matter how short is your wp_timeout.
Could this be little more helpful?
Best regards,
Quan
wp_index = {}
wp_timeout = 6
wp_path = homedir.."/.config/wallpapers/"
wp_filter = function(s) return string.match(s,"%.png$") or
string.match(s,"%.jpg$") end
wp_files = scandir(wp_path, wp_filter)
-- setup the timer
local wp_timer = timer { timeout = wp_timeout }
wp_timer:connect_signal("timeout", function()
-- set wallpaper to current index for all screens
for s = 1, screen.count() do
wp_index[s] = math.random( 1, #wp_files)
gears.wallpaper.maximized(wp_path .. wp_files[wp_index[s]], s)
end
-- stop the timer after run once
wp_timer:stop()
end)
-- initial start when rc.lua is first run
--wp_timer:start()
if wp_timer.started then
wp_timer:stop()
else
wp_timer:start()
end
On Wed, Jun 25, 2014 at 10:29:12AM +0200, Max Woelfing wrote:
> Hello Quan,
>
> thank you for the reply, unfortunately I only can use your method as an
> workaround, since it did not fix the problem, after it switched to the 2nd
> picture, the wallpaper is maximized successfully, but for me it's not really
> helpful, because I would decrease the timeout too much, and then the
> wallpaper rotation were too fast. So I still have to press the hotkeys for
> awesome.restart manually upon startup. :(
>
> Best, Max
>
> * Quan Guo [24.06.14 21:14]:
>
> > wp_index = {}
> > wp_timeout = 3600
> > wp_path = homedir.."/.config/wallpapers/"
> > wp_filter = function(s) return string.match(s,"%.png$") or
> > string.match(s,"%.jpg$") end
> > wp_files = scandir(wp_path, wp_filter)
> >
> > -- setup the timer
> > local wp_timer = timer { timeout = wp_timeout }
> > wp_timer:connect_signal("timeout", function()
> >
> > -- set wallpaper to current index for all screens
> > for s = 1, screen.count() do
> > wp_index[s] = math.random( 1, #wp_files)
> > gears.wallpaper.maximized(wp_path .. wp_files[wp_index[s]], s)
> > end
> >
> > if wp_timer.started then
> > wp_timer:stop()
> > else
> > wp_timer:start()
> > end
> >
> >
> > On Tue, Jun 24, 2014 at 11:23:43AM +0200, Max Woelfing wrote:
> > >
> > > for quite some time now, I have an annoying problem; It seems Awesome is
> > > not able to maximize the wallpaper over the 2nd. screen, if the monitor
> > > is connected on startup.
> > > After I run 'awesome.restart', the wallpaper is set correctly.
> > >
> > > Before restart the wallpaper overlaps the 2nd. screen a bit from the 1st.
> > > one. The leftover (more than the half) is simply black.
> > >
> > > First I thought Awesome isn't able to notice that a 2nd. screen is
> > > connected, so I verified that "screen.count()" is set to 2.
> > >
>
> --
> -w0lf
>
> --
> To unsubscribe, send mail to [email protected].
--
To unsubscribe, send mail to [email protected].