Test application version

Arch Linux Picom version 12.5 example configuration file is very different from the earlier one. To prevent it from freezing, it needs a test without a Bash script.

picVer=$(picom --version)
echo $picVer
v12.5
picVERSION=$(echo $picVer | sed 's/^.//')
echo $picVERSION
12.5

Two lines to test (bogus example):

Test ($picVERSION < 12) Exec exec picom --config ~/.config/picom/picom.conf
Test ($picVERSION >= 12) Exec exec picom --config ~/.config/picom/picom.12.conf

I found an old (2005) similar topic that doesn’t seem valid.

You should read the manual page, it will answer questions like this. For example if you look up the ‘Test’ conditional you will see how it can be used. You cannot test environment variables directly like that, but you can use Test (EnvMatch varname pattern) to test things.

How to add in InfoStoreAdd picVER value:
exec picom --version | sed 's/^.//'

You will have to use PipeRead and do the test in the shell, then output the command fvwm command needed to set the InfoStore variable.

PipeRead 'echo InfoStoreAdd picVERSION `picom --version | sed 's/^.//'`'
Test (EnvMatch infostore.picVERSION 9.*) Exec exec picom --config ~/.config/picom/picom.conf

How to add value condition… test if version is lower than 12? Example
Test (EnvMatch infostore.picVERSION < 12)

Read the manual page please, I am not here to do that for you. There is no < operation for EnvMatch.