[openbox] Launching applications

Anthony Thyssen A.Thyssen at griffith.edu.au
Tue Oct 4 22:26:16 EDT 2011

On Tue, 4 Oct 2011 18:14:55 +0100
Jorge Almeida <jjalmeida at gmail.com> wrote:
| On Tue, Oct 4, 2011 at 5:49 PM, Dana Jansens <dana at orodu.net> wrote:
| > On Tue, Oct 4, 2011 at 12:27 PM, Jorge Almeida <jjalmeida at gmail.com> wrote:
| >>
| >> On Tue, Oct 4, 2011 at 9:18 AM, Manolo Martínez
| >> <manolo at austrohungaro.com> wrote:
| >> >
| >> > It would be nice to improve this solution in at least the following
| >> > respect: when
| >> > editing a message in mutt, vim takes over and the window changes title,
| >> > so that
| >> > wmctrl no longer recognises it. Taking
| >> > "-F" out would take care of that ("mutt" is part of the window title
| >> > when vim
| >> > edits a mutt file), but with the drawback that if I were editing
| >> > , say, .muttrc, Alt+F5 would be fooled into raising *that* window. But,
| >> > oh well, I think the
| >> > instruction as it stands is idiotproof enough for my own level of
| >> > idiocy.
| >> >
| >>
| >> One idea that comes to mind is to edit the config of mutt in the place
| >> where you tell it what editor to use. Maybe you could tell mutt to use
| >> something like
| >>        /usr/bin/vim +c 'set title titlestring="Mutt"'
| >> I tried this from a terminal and it doesn't works as expected: the title
| >> becomes "set title...". You still get the string "Mutt", and so I guess
| >> it would work if you use something like "Muttwindow" to distinguish it
| >> from a window where .muttrc is being edited. But it's an ugly hack.
| >> What happens is that vim is following the behavior of bash: it puts the
| >> name of the command executed, or the current directory, if no command
| >> was provided, as title. Before entering interactive mode, bash
| >> executes the command contained in the env variable PROMPT_COMMAND, if
| >> set. In ArchLinux, it is set by /etc/bash.bashrc, and is an "echo
| >> some-stuff-with-escape-codes". I had to comment it
| >> out, and I think it was a bad idea, anyway. In vim, I don't know what
| >> configuration is causing this. Maybe someone else have some clue?
| >
| > Unless I missed some important context.. use the terminal's name to find it
| > instead of the title?
| >
| I'm not sure I understand, but if you mean something like "urxvt -name
| Mutt", how to use wmctrl to raise it? "wmctrl -a <WIN>" works as long as
| <WIN> contains a string we know of in advance, and the string must be
| contained in the window title. Any other alternative?
Only some programs match against the "title" others match both.

Some other tools I have listed (for example xdotool) can restrict the
match to the instance class name which can typically will not change
during the life of the application window.

WARNING: many manuals and documentation of these tools confuse the
X window attributes...   Class Name,  Instance name,  Title.
Especially window search programs.  Best idea is to 'play' and
be sure what they are matching on.

ASIDE: vim does not understand or modify window title by default
(unless it is Gvim), Perhaps something has specifically told it to do
so.  May be that specific linux. It certainly does not do it in Fedora!

Mind you I did not the install gvim package version of vim, so I know
it has no X window features at all!  I want it that way!

  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
  Rose to a Dalek:  "Five million Cybermen. Easy.
         One Doctor? Now you're scared."      -- Doctor Who, "Doomsday"
   Anthony's Castle     http://www.ict.griffith.edu.au/anthony/

More information about the openbox mailing list