On Sun, 31 May 2009, Gregor Best wrote:

> At Sat, 30 May 2009 23:11:22 +0200
> Paweł Zuzelski wrote:
> 
> > Hello,
> > 
> > how to assign a newly spawned client to a variable in
> > awesome-3.3rc4?
> > 
> > I tried:
> > 
> >     awful.util.spawn_with_shell("LANG=pl_PL.UTF8 xterm -e ssh example.net -t
> > screen -rU") im_irssi = client.focus
> > 
> > But it does not work. im_irssi is previosly focused client. I guess
> > that is because "= client.focus" is executed before xterm displays
> > window.
> > 
> 
> Dumb question, why don't you just set the variable in the manage hook?

Because I want to know that this is window created by just spawned
process. I do not know how to pass information to manage hook. Is it
possible?

Maybe I should describe what I want to achive:

Simple example:

I want to spawn xterm and add tittle bar to it (but only to this
xterm, not to all xterms).

Complex example:

I want to bind the following action to win+i:

if "im_irssi" does not exists:
  if "im_tag" does not exists create "im_tag"
  switch to im_tag
  spawn xterm with irssi
else switch to im_tag and raise xterm with irssi on top

and bind the following action to win+e:

if "im_ekg2" does not exists:
  if "im_tag" does not exists create "im_tag"
  switch to im_tag
  spawn xterm with ekg2
else switch to im_tag and raise xterm with ekg2 on top

so I want to create two variables im_irssi and im_ekg2, because I
want to know with client to raise.

-- 
Paweł Zuzelski                                    xmpp/e-mail: [email protected]
PLD Linux developer                                   http://pld-linux.org

-- 
To unsubscribe, send mail to [email protected].

Reply via email to