Re: how to start an application on a given workspace

On Fri, 16 Jul 2004 13:13:17 -0500, "Eric Mangold" <teratorn world-net net>
posted to gmane.comp.window-managers.sawfish:
 > On Thu, 15 Jul 2004 04:36:46 -0700 (PDT), Max <cbm128 yahoo com> wrote:
 >> Has anybody an idea how I could fire up an application
 >> and have it show
 >> up on a specific workspace?
 > You can do it using Matched Windows.

I use a combination of matched windows and a shell script I fire up
from within my .xsession, on top of the Gnome session management

Matched windows don't work well when you have several windows of the
same type. Perhaps there's a workaround (start each with its unique
title maybe) but I've simply avoided the issue.

So here's what I'm doing to start a bunch of xterms on viewport 0 1:

---- cut ---- >8 ----
# switch to lower viewport
sawfish-client -e '(set-screen-viewport 0 1)'

# lower right corner, only above gnome task bar and left of gkrellms
xtoolwait ssh foo -fn 5x7 -geometry =80x25-84-30
sleep 6

# three small bar windows, stack above foo window
while read pos cmd; do
    xtoolwait xterm -fn 5x7 -geometry =80x25$pos -e ssh -t bar $cmd &
done <<____HERE
    -84-236     tail --follow=name /var/log/procmail.log
    -84-442     tail --follow=name /var/log/mail.log
    -84-648     top

# switch back to upper viewport
sawfish-client -e '(set-screen-viewport 0 0)'
---- 8< ---- tuc ----

It could probably all be done in Lisp -- I used to have a big whopping
piece of sawfish-client script in there which however I managed to
replace entirely with matching windows.

The sleep is a bit of a wart but I've found that xtoolwait is not
enough when there's port forwarding over ssh etc involved.

Replace viewports with workspaces and you should be all set. The
function to switch to a different workspace appears to be called

/* era */

formail -s procmail < >
cat | more | cat<>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]