Quake-like-console configuration: problem with ForEach action

Martin Jiřička <[email protected]>
Newsgroups gmane.comp.window-managers.openbox
Message-ID <CA+i+VCfu5=uvmKYgrGO4rOKbcjRw_h7ux441Qsb3Ot57iw=aYg@mail.gmail.com>
Hello!

I installed Openbox for the first time a few days ago. I was really
impressed how well a configuration process went. But in the end I had
a following problem.

I tried to configure a terminal window to act as something that was
somewhere called quake-like-console (i.e. an "adhoc" terminal that
appears after hitting some key above all windows and is available on
all desktops). I have already found some solution using external bash
script, but I think that following implementation would be more
elegant and maybe even more practical.

My idea is to start a terminal (urxvt in my case) with some special
title (like "quake_console"). Then create some rules for it:

  <application name="urxvt" class="URxvt" title="quake_console">
    <decor>no</decor>
    <position force="yes">
      <x>right</x>
      <y>0</y>
    </position>

    <size>
      <width>100%</width>
      <height>40%</height>
    </size>

    <focus>yes</focus>
    <desktop>all</desktop>
    <layer>above</layer>
    <iconic>no</iconic>
    <skip_pager>yes</skip_pager>
    <skip_taskbar>yes</skip_taskbar>
    <fullscreen>no</fullscreen>
    <maximized>no</maximized>
  </application>

This works.

Now I need a key binding that would handle hiding and displaying of
the terminal. But the following snippet does not work:

  <keybind key="W-w">
    <!-- Find the terminal. -->
    <action name="ForEach">
      <title>quake_console</title>
      <then>
        <!-- Is it displayed? -->
        <action name="If">
          <desktop>current</desktop>
          <then>
            <!-- Hide it. -->
            <action name="SendToDesktop">
              <to>10</to>
              <wrap>no</wrap>
              <follow>no</follow>
            </action>
          </then>
          <else>
            <!-- Show it. -->
            <action name="SendToDesktop">
              <to>current</to>
              <wrap>no</wrap>
              <follow>no</follow>
            </action>
          </else>
        </action>
      </then>
    </action>
  </keybind>

And I do not understand where is a problem. I did not find any way how
to debug these rules. Documentation is not very helpful
(http://openbox.org/wiki/Help:Actions#If). In the doc is introduces a
"basic structure" of the If action, where is "query" element, but in
the examples below is no such element used, which puzzles me even
more.

I made some simpler tests and it looks like that "title" condition is
not working.

Can somebody give me a hint why the second snippet does not work please?


Best regards
Martin Jiřička
_______________________________________________
openbox mailing list
[email protected]
http://icculus.org/mailman/listinfo/openbox
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.