Re: jump-or-exec

Christopher Roy Bratusek <[email protected]>
Newsgroups gmane.comp.window-managers.sawfish
Message-ID <3142086.JWvAsaSIHH@ambassador>
On Friday 11 January 2013 02:07:38 D M German wrote:
> Hi everybody,
> 
> When trying to create a new window using a command (gnome-terminal), how
> do I get the window identifier of the window?
> 
> I am doing the following:
> 
>                ;; create window
>                (jump-or-exec "decker" "/home/dmg/bin/decker.sh" nil)
>                ;; make it sticky
>                (make-window-sticky (get-window-by-name "decker"))
> 
> But... jump-or-exec does execute the window, but now that window is
> "being" created while I continue executing this code. The window does
> not exist by the time (get-window-by-name "decker") gets executed (it
> exists later, I have tested). If I put a (sleep-for <few seconds>)
> sawfish stops, but that does not fix the problem.
> 
> any ideas how can I wait after the exec before I ask for the window that
> was just recently created?
> 
> thanks!

Yes, use a window-matcher instead:

(add-window-matcher '((WM_CLASS . "^class/instance$"))
  '((sticky . t)
    (sticky-viewport . t)))

Regards,
Chris

-- 
Sawfish ML
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.