FVWM: Re: dynamical Style changes to a specific xterm

From: Grzegorz Nieweglowski <hoppke_at_go2.pl>
Date: Sun, 13 Oct 2002 09:56:04 +0200

> Please start a separate thread with a relevant subject when asking new
> questions. When you get dozens of messages daily, it helps a lot.

OK. Sorry for the inconvenience, folks :)

> > I know that I can force an xterm to change it's title to something
> > unique, either with a command line/X resource option, or with an
> > escape sequence at run-time, but that really isn't a solution.
> > (...)
>
> If something is only configurable using Style and you don't use the
> unique id string, this is not possible yet. But setting Style on per
> window basis (and not just on per id basis as it is now) is on to-do
> list.

I guess it will be working perfectly around fvwm-3.0 ;)

The best window matching I've seen so far is implemented is Sawfish
- especially the possibility to combine several "categories" (Class,
Name, Title, process name, locale etc.) into a single pattern, and all
of that buffed with additional regexp-ing.

The current window-matching part of the "Style" command just doesn't
seem to fit such a flexible and powerfull WM that FVWM evolved to be.

> Practically, it is often solvable without such functionality. Just
> start all special xterms with -name YourUniqueId option (-n and -T may
> work too) and configure Style YourUniqueId.
>
> But of course, this is a statical solution, you ask for a dynamical
> one. You may change the window name and icon name of xterm
> dynamically using:
>
> printf "\033]1;MyNewIconTitleName\007"
> printf "\033]2;MyNewWindowTitleName\007"

But this, on the other hand, requires me to have a CLI active in that
xterm. And this is quite inconvenient, if not impossible, when running
some programmes, like eg. slrn.

Besides, those techniques were already known to me :) I even mentioned
them in the original mesage (X resource/command line option/escape
sequences).

There is a third possibility. It's not perfect, but works (mostly) for
me. I usually start my xterms via a Meta-x keystroke, so I can create
a wrapper around the xterm binary. A simple shell (or perl) script, that
automatically changes the "name" property of the xterm, by, let's say,
appending a unique two-letter code to the property and then running an
xterm with this modified command line. The script would only have to
remember the last used combination, and increase the "counter" every
time an xterm is run. Deallocating ID's left behind by terminated xterms
is irrelevant, although possible. This approach is trivial to code in
perl, a bit harder in pure shell, but the "pure shell" method would
cause less overhead. If coded as a fvwm-perl-module, it would work very
fast (no need to start a perl interpreter every time a "run xterm"
request is issued), and could automatically deallocate unused ID's and
styles.

-- 
\hoppke
(Grzegorz Nieweglowski)
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sun Oct 13 2002 - 02:58:48 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST