On Tue, Sep 08, 2009 at 01:55:03PM +0200, Alessandro Massignan wrote:
> [...]
> Mmmh... And if i would to handle the client position just after
> spawning it avoiding
> the hook path? That is handling it in the same function.
> Eg.:
> 
> function launch_terminal()
>   awful.util.spawn("xterm")
>   -- handling its positioning and dimensioning here --
> end
> [...]

But you wouldn't know which client object to modify. "Solutions" like
this and the "change a global variable" are prone to race conditions if
another window opens between executing the spawn command and the window
finally appearing.

The easiest and most stable way would be to pass a class name to xterm
with the -name option and, if you want to keep everything in the same
file, simply registering a manage hook which checks for the specific
class and handles the window.

-- 
GCS/IT/M d- s+:- a-- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- ?O M-- ?V PS++ PE- Y++ PGP+++ t+ 5 X+ R tv b+++ DI+++
D+++ G+ e h! r y+

    Gregor Best

Attachment: pgpJB84Ro3loU.pgp
Description: PGP signature

Reply via email to