I have in my FvwmButton xosview. This config is also on a live-stick. and i want to show xosview only on displays which are higher than 700px. One computer is an Acer one with an display this is only 600px high…
But i have no idea, how to show or show not this Button…
If I understand the manual correctly, the relational operators are part of the Version conditional and don’t work with arbitrary expressions. However, I may have found a solution that, albeit in a somewhat roundabout way, does what you want.
In your X startup script (typically ~/.xinitrc or ~/.xsession), use xrandr to determine the screen height and set an environment variable accordingly (before starting Fvwm of course!):
TRESHOLD=700
RESULT=`xrandr | head -n 1 | sed -e s/,//g | awk '{print $10}'` # Mind the difference between quotes and backquotes!
if [ ${RESULT} -ge ${TRESHOLD} ]; then
export FOO=yes
else
export FOO=no
fiNote that xrandr is usually part of one’s X11 distribution/package so it’s usually already there and doesn’t need to be installed separately.
In your Fvwm configuration file, use EnvMatch to examine the environment variable:
Test (EnvMatch FOO yes) do_something
TestRc (NoMatch) do_something_else
Disclaimer: I haven’t actually tested the above, but you probably get the idea. You may need to tweak the RESULT=… line a bit depending on exactly what the output of xrandr looks like on your system.