I use FvwmButtons. But since you have to manually code which width you resolution are using with the ‘geometry’ option it does not look good if I change resolution (it is also necessary to make the sum of the buttons pixels fit for each resolution ).
Therefore I have made 3 different versions of the .fvwm2rc file for the following 3 resolutions:
When I start fvwm I would like to have a script that checks which resolution that I am using and the load the correct .fvwm2rc file.
Is that possible or is there some other way around making FvwmButtons look correct for different resolutions?
No – and why would you want to do this? The syntax above denotes some form of arithmetic operation performed on $[vp.width] – I suspect you meant:
SentEnv width $[vp.width]
Although that raises two points:
Why would you want to store the already stored number defined in $[vp.width] in a separate variable (given that it’s unlikely to change). and then:
Given your example above, what makes you think you need to use PipeRead?
If you’re going to be using that, then use $[vp.width] directly. Again, please re-read that FAQ entry. You have not demonstrated any form of arithemtic manipuation that warrants the use of $[width]. Note that depending on the order of precedence, you might need to double expand $[vp.width] as in:
I can’t say for sure, since all of your code fragments are out of context, but it’s unlikely in this case.
width in this case it 1400. 573 is the total number of pixels for all my buttons excluding the swallowing of the IconMan. This should leave 827 pixels for the IconMan when I use 1400x1050 as resolution.
Like Thomas already said, you don’t need to do that, since
*FvwmDock: Geometry $[vp.width]x25+0-0
is exactly the same thing. You’re just making another variable holding the same thing. This is a good thing to realize, and to see the rest of the fvwm variables, search the fvwm manual page for “COMMAND EXPANSION”. (‘man fvwm’, ‘/COMMAND EXPANSION’)