Discussion:
FVWM: Focus window based on class or resource
Thomas Glanzmann
2016-07-31 18:23:05 UTC
Permalink
Hello,
I use evince as pdf viewer. They recently changed the Name and Icon Name
to the name of the pdf. Now I'm unable to use my previous keybinding to
bring evince to focus. Is there way to use Next and specify 'Class' which is
Evince or 'Ressource' which is evince?

Key A A SC SmartStart "evince"

AddToFunc SmartStart
+ I Next ($0) Iconify off
+ I Next ($0) Raise
+ I Next (AcceptsFocus, $0) focus
+ I None ($0) Exec exec $1

Cheers,
Thomas
Dan Espen
2016-07-31 18:46:00 UTC
Permalink
Post by Thomas Glanzmann
Hello,
I use evince as pdf viewer. They recently changed the Name and Icon Name
to the name of the pdf. Now I'm unable to use my previous keybinding to
bring evince to focus. Is there way to use Next and specify 'Class' which is
Evince or 'Ressource' which is evince?
Key A A SC SmartStart "evince"
AddToFunc SmartStart
+ I Next ($0) Iconify off
+ I Next ($0) Raise
+ I Next (AcceptsFocus, $0) focus
+ I None ($0) Exec exec $1
These commands match on:

The window name, icon name, class, and resource are considered when
attempting to find a match.

As long as Evince has something unchanging in class or resource you
should be good to go.

If all of those thing change, it's a problem with Evince.
--
Dan Espen
Thomas Glanzmann
2016-07-31 19:15:31 UTC
Permalink
Hello Dan,
Post by Dan Espen
The window name, icon name, class, and resource are considered when
attempting to find a match.
As long as Evince has something unchanging in class or resource you
should be good to go.
If all of those thing change, it's a problem with Evince.
thank you. After you mentioned that it has to work I realised that the
problem was that I had two SmartStart lines for the same Key
combination.

Cheers,
Thomas

Loading...