Closed GoogleCodeExporter closed 9 years ago
Some additional information: Ubuntu 11.04, GNOME 2.32.1
Original comment by prof...@gmail.com
on 10 Sep 2011 at 6:57
The reason why with
class.desktop_window =
it doesn't work is that xatk uses only the second part of window class (the
string after period). So this rule never applies to any window.
Having
title.x-nautilus-desktop =
it will not work as you expect too. Say, you have the following windows:
1. title: x-nautilus-desktop, class: nautilus
2. title: abc, class: nautilus
and you have the following rules:
1. class.nautilus = !n
2. title.x-nautilus-desktop =
You want to apply the 2nd rule for window #1, and to apply the 1st
rule for window #2. xatk cannot know which rule to which window you
want to apply. So, it chooses rule #1 for both windows, because rules
with permanent keys have higher priority than others.
Improvements to xatk which could resolve this situation include:
1. Introduce a new property (e.g. class0) to rules, which would
correspond to the first part of the window class. Then, the rules
would look like:
class0.desktop_window =
class0.nautilus = !n
2. Add support for something like logical AND for rules, e.g.
class.nautilus AND title.x-nautilus-desktop =
class.nautilus AND title.(?!x-nautilus-desktop) = !n
While the first solution is simpler, I think the second one is more
common use case.
As a temporary workaround you can remove the following rule
class.nautilus = !n
leave
title.x-nautilus-desktop =
and add a history item
nautilus = n
But of course, it will not guarantee that 'n' for nautilus will never
move to other window.
Feel free to make other suggestions or ask questions.
Original comment by levit.slava
on 10 Sep 2011 at 8:47
> it doesn't work is that xatk uses only the second part of window class (the
string after period). So this rule never applies to any window.
If use full name of class (with period) or concatenate two parts in one.
If it isn't possible, I think that second variant (with logical operator) woul
be cool.
> As a temporary workaround you can remove the following rule ... and add a
history item.
Thanks! Ill use it.
> But of course, it will not guarantee that 'n' for nautilus will never move to
other window.
I use small bash script with sed command witch change key for history items in
~/.xatkrc, it work well for me :)
Original comment by prof...@gmail.com
on 11 Sep 2011 at 9:06
I think I've found a better way of handling such windows as x-nautilus-desktop.
I have just discovered that x-nautilus-desktop is a window which is responsible
for things like drawing icons on the desktop. So, its type is DESKTOP [1]. We
can bind only windows which have type either NORMAL, or DIALOG by default.
Therefore, desktop, panels, docks, splash screens will be ignored.
I think concatenating parts of WM_CLASS with period is not good. Mainly because
the property itself can contain a period and secondly this would break already
existing user-defined rules.
Using logical operator with syntax, I have suggested, is impossible because
there is no way to determine if it is a part of previous regex or another
expression. As for now, I think, implementation of logical expressions in rules
would be a unreasonable complication and has a small set of use cases.
Your solution with use of sed sounds interesting :) But there is no guarantee
anyway.
[1] Information about all window types can be found here:
http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2551529
Original comment by levit.slava
on 12 Sep 2011 at 5:47
Great news! I am waiting with impatience for new version and ready for testing
:)
Original comment by prof...@gmail.com
on 14 Sep 2011 at 8:41
Revision bb218db463a6 introduced window_types option, which is "NORMAL DIALOG
UTILITY MENU" by default. So, now x-nautilus-desktop (DESKTOP) and some other
windows should be ignored by default.
Original comment by levit.slava
on 18 Sep 2011 at 1:30
Excellent, i am really satisfied to use it.
I wrote a small review
http://proft.me/2011/09/18/xatk-udobnoe-pereklyuchenie-okon/.
Original comment by prof...@gmail.com
on 18 Sep 2011 at 9:08
Thanks for spreading the word.
Revision 0080ff5480 also provides a property called instance, which is the
first part of WM_CLASS.
Original comment by levit.slava
on 19 Sep 2011 at 6:24
I saw it property, but i don't know where to use it now :) problem with
nautilus is fixed and other apps work well with new version (y).
Original comment by prof...@gmail.com
on 19 Sep 2011 at 8:02
Original issue reported on code.google.com by
prof...@gmail.com
on 10 Sep 2011 at 6:55