Re: [Sawfish] jump-or-exec

[ Thread Index | Date Index | More Archives ]

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/" 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)))


Sawfish ML

Mail converted by MHonArc 2.6.19+