I've patched fvwm-2.0.43 to handle negative conditions with a leading
'!' character. I use
Next [!Iconic CurrentDesk CurrentScreen !Fvwm*] Focus
in my .fvwmrc to move to cycle through the windows on the current
screen. The "!Fvwm*" part is what ignores all windows with a name,
class, or resource matching "Fvwm*". I'd rather use the "go to the
next window ignoring these windows" style instead of "go to the next
window with a name like ____."
I managed to resist the temptation to put in complete regular
expressions, as that would break the documented behavior of Next and
Prev. Instead, I simply expanded the already existing '!' convention
to window names.
The patch isn't the prettiest. Perhaps I should have included misc.h
which would have gotten me the NoClass and NoResource variables to use
instead of the literal strings.
I hope others will enjoy this patch.
*** wild.c Fri Jul 12 10:55:14 1996
--- wild.c-orig Tue Sep 13 14:11:47 1994
***************
*** 12,36 ****
*
* This code donated by Paul Hudson <paulh_at_harlequin.co.uk>
* It is public domain, no strings attached. No guarantees either.
- *
- * Simple code to understand patterns that begin with '!' to reverse
- * the bias of the search. (I use it with commands like
- * Next [!Iconic CurrentDesk CurrentScreen !Fvwm*] Focus
- * Mods by Douglas Rand <rand_at_aero.und.edu>
*
*****************************************************************************/
int matchWildcards(char *pattern, char *string)
{
! if (pattern == NULL)
! return TRUE;
! else if (*pattern == '!')
{
- if(strcmp(string, "NoClass") == 0 || strcmp(string, "NoResource") == 0)
- return FALSE;
- else return !matchWildcards(pattern + 1, string);
- }
- else if (string == NULL)
- {
if(pattern == NULL)
return TRUE;
else if(strcmp(pattern,"*")==0)
--- 12,23 ----
*
* This code donated by Paul Hudson <paulh_at_harlequin.co.uk>
* It is public domain, no strings attached. No guarantees either.
*
*****************************************************************************/
int matchWildcards(char *pattern, char *string)
{
! if(string == NULL)
{
if(pattern == NULL)
return TRUE;
else if(strcmp(pattern,"*")==0)
--
Douglas K. Rand rand_at_aero.und.edu
System/Network Administrator Scientific Computing Center -- UND Aerospace
Office: +1 701 777 2801 University of North Dakota
FAX: +1 701 777 2940 Box 9022, Grand Forks ND 58202-9022
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Jul 15 1996 - 16:11:29 BST