Below is a (simplified) portion of my StartFunction
AddToFunc StartFunction
+ I Exec exec resize egg.jpg wp.png
+ I Exec exec fvwm-root -r wp.png
The first line resizes egg.jpg and outputs wp.png. The second line makes that a wallpaper. The problem is that it doesn’t work every time I start X window or restart it. To make it work allways I first have to comment out only the second line and restart -> that only resizes the wallpaper and saves the image. Then I comment out only the first line and restart again -> that only initializes the wallpaper. What might be the problem here?
Is there a way to see fvwm debug info anywhere? Why doesn’t the second line alter the wallpaper if the resizing is being done at the same time? Could there be a situation where the lines are accessing the same file simultaneously and problems arise?
Anyone, please correct if that is still a wrong way to do it. I think it now waits after the command has been executed completely. The above at least seemed to finally produce the desired outcome!
This fvwm is definitely not so easy beast to tame but step by step I’m gaining some knowledge thanks to this forum! I wish there were even more users contributing - maybe some day
That was what I meant by something similar. I’ve not been using it a lot, so I didn’t really know the exact flow it would take, and didn’t bother to think about what it really would do.
OT: Next I have to start to figure out to properly rearrange thumbnails. Now everything that can be seen (wallpaper) through a partially transcluent thumbnail get’s copied to a new location. Obviously the alpha blending should be redone there. Situation gets corrected if I “paint” over the thumbnail with a window… Time for testing and learning. [sigh]
Yes, but this will happen every time FVWM loads, regardless of init or a restart. So I would probably do:
AddToFunc StartFunction
+ I Test (Init) Exec resize foo.jpg wp.png
+ I Exec exec fvwm-root -r wp.png
That way, you save having to always resize the image. (I would also have used ‘convert’ here, as there appears to be no resize dimensions anywhere in the above example.)
The original example was really a simplified version. I’ve learnt that providing a minimal example usually yields better responses than posting many pages of code
In reality I let FVWM report the desktop dimensions to the resizer so the wallpaper size will always be correct. And I also want it to scale the image whenever the resolution is changed. (I don’t know how to change resolution on the fly besides editing xorg.conf but that is another matter
BTW is there any functional differences between using Test (Init) and using InitFunction? (Besides that InitFunction is executed after StartFunction)
Take a look at xrandr if your system can support it.
Then you could probably write a function that would call xrandr to do the resolution change, then call your resize, and fvwm-root again.