Re: Quake-like-console configuration: problem with ForEach action
Mikael Magnusson <[email protected]>
| Newsgroups | gmane.comp.window-managers.openbox |
|---|---|
| Message-ID | <CAHYJk3TQcijWiZFAkat1T24SG0s2j8S01HNTRh0HX3ZRDC=V4g@mail.gmail.com> |
On Fri, Jan 2, 2015 at 6:41 PM, Martin Jiřička <[email protected]> wrote: > 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? Your snippet works perfectly for me. Do you actually have a version that supports the ForEach action? It requires 3.6 which is not yet released. So the good news is the documentation is correct :). -- Mikael Magnusson _______________________________________________ openbox mailing list [email protected] http://icculus.org/mailman/listinfo/openbox