Re: tab's name question... (beginner)

Tuomo Valkonen <[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
On 2008-01-04, Jean Verdon <[email protected]> wrote:
> I plan to write a monitor for the status bar to be warned when a
> tab's name changes 

The "right" approach to something imporatnt happening in an application
is, of course, for the application to set the X UrgencyHint. When this
happens, Ion will display a box a corner of the screen indicating this,
as well as move (in the stock configuration) the window on top in the 
Mod1+K K listing. There also exists a statusbar script for listing such
windows [1]. (I'm afraid I don't know if it is up-to-date.)

You could, based on name change, also set the activity/urgency flag from
a script.

> Unfortunately, I don't know how to get those names ! 
> print(WClientWin.name(_)) only returns "WFrame<n>" and
> such. 

The object _ is bound to depends on the context. It is only
bound to WClientWin in bindings for client windows. _sub may
in such situation be bound to WGroupCW, but even this does not
get you the name yet... (WRegion.displayname isn't presently 
exported to the Lua side.)

However, I don't think you need to worry about the nesting of
objects in this case. If you hook on to region_notify_hook, and
check for name change messages, you should have the client window 
in question directly at hand, and can do what you need to do.
The aforementioned script [1] provides an example of using the
hook in question.


  [1]: http://iki.fi/tuomov/repos/ion-scripts-3/statusbar/statusbar_act.lua

-- 
Tuomo
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.