Hello, for a long time I've been using a small patch to fvwm 2.4.8, (which now is adopted to 2.4.18 and 2.5.10, too) and would like to ask if other people find it usefull too (so it could be included into the fvwm source one day):
Description: The patch adds the following syntax to Condition checks to selectively select a match (or mismatch) of a name, icon name, resource name or class: %r==RESOURCE %c==CLASS %i==ICONNAME %n==NAME %r!=RESOURCE %c!=CLASS %i!=ICONNAME %n!=NAME With this patch it's possible to implement the following: AddToFunc FocusAndRaise + "I" Focus + "I" Raise AddToFunc CycleFunc + I Current (%c==Maker) $0 (%c==Maker,$1) $2 + I Current (%c==Gimp) $0 (%c==Gimp,$1) $2 + I Current (%c==Sylpheed) $0 (%c==Sylpheed,$1) $2 + I Current (%c==MiXViews) $0 (%c==MiXViews,$1) $2 + I Current (%c==Zmail) $0 (%c==Zmail,$1) $2 + I Current (%c==XTerm %r==RTerm) $0 (%c==XTerm,%r==RTerm,$1) $2 + I Current (%c==XTerm %r==TMan) $0 (%c==XTerm,%r==TMan,$1) $2 + I Current (Ddd*) $0 (Ddd*,$1) $2 + I Current (%c==XTerm %r==Ddd) $0 (%c!=XTerm,Ddd*,$1) $2 + I Current (%c==XTerm %r!=RTerm %r!=TMan %r!=Ddd) $0 (%c==XTerm,%r!=RTerm,%r!=TMan,%r!=Ddd,$1) $2 + I Current (%c!=XTerm %c!=Zmail %c!=Ddd %c!=Gimp %c!=Maker %c!=Sylpheed %c!=MiXViews) $0 (%r==$r,$1) $2 Key "w" WFST 4 Current CycleFunc Next !Iconic,CurrentDesk FocusAndRaise Key "w" WFST S4 Current CycleFunc Prev !Iconic,CurrentDesk FocusAndRaise thus giving a possibility to cycle trough the windows of the currently focused application, where the application is selected on its resource or class (depending: some apps, for example the gimp or sylpheed, use the same class for all of their windows, where most other applications are using the same resource for all of their windows). False matches with a random title or icon name, or missing matches are avoided which seems impossible in practice using simpler methods like AddToFunc SimpleCycleFunc + I Current ($r) $0 ($r,$1) $2 Key "w" WFST 4 Current SimpleCycleFunc Next !Iconic,CurrentDesk FocusAndRaise The patch has been written since I didn't see a simple way to implement this functionality (bound in the example above to "w" + (Shift) Mod4), at least not without having to invoke external programs. I don't care much about the current syntax. So if people would like (and incooporate) the patch feel free to make improvement suggestions. The patch has been tested successfully with fvwm 2.4.8 for more than a year (8 hours per day usage) and fvwm 2.5.10 for about two weeks. Markus Schwarzenberg Attachments: patches (diff -u) for fvwm 2.4.18 and 2.5.10
special_conditions-2.4.18.diff.gz
Description: Binary data
special_conditions-2.5.10.diff.gz
Description: Binary data