I dont know of any version of pgrep that supports the -m and -e options.
I suppose that those flags have a strong relation with the grep ones,
-m N used to stop after N matches and -e PATTERN to match a lot of
different patterns.
So this is a patch to stop depending on those options, simply by
iterating over all the possible window managers and doing a pgrep on
each one until we find the one that is running.
I dont know of any version of pgrep that supports the -m and -e options. I suppose that those flags have a strong relation with the grep ones, -m N used to stop after N matches and -e PATTERN to match a lot of different patterns. So this is a patch to stop depending on those options, simply by iterating over all the possible window managers and doing a pgrep on each one until we find the one that is running.
This fixes #51