Re: Backgrounds

Greg Anderson (Nifft@FutureRealms.com)
Mon, 19 Apr 1999 12:50:42 -0400


> > >Mitchell Ullman:
> > > Sounds and looks like the first "correct" usage of the pager yet!... 

> >Coplan:
> > There is a big problem with having so many desks though.  Ever tried
> > restarting afterstep?  I'll throw EVERYTHING onto the first desk....

>Ewan Dunbar:
> I think you've missed the point. You edit the database file and put in
> "StartsOnDesk" lines. Otherwise, there's no point in doing it, since you
> have to manually move things over to the appropriate desk depending on
> their category.

Exactly.  I created a entry in my database for each desktop and page then
I control launching a program by positioning it with nxterm -name.  There
may be a better way to do this but this is how I would launch my xemacs
on page one of desktop 10 in my startup script:

#!/bin/bash
Network=d1
ASconfig=d2
System=d3
Work=d4
Help=d5
Search=d6
WWW=d7
Shop=d8
Mail=d9
TclTk=d10
Games=d11
Files=d12

nxterm +ut -name $TclTk.1 -T "xEmacs" -e ls /tmp/x ; xemacs -geometry 
80x40+41+130 ~/src/test/Tcl/FloppyCatalogue.tcl ~/src/test/Tcl/stringLib.tcl&
sleep 1

The "-e ls /tmp/x ;" is basically a no-op that allows me use nxterm 
to load in desktop 10, page 1 and then launch xemacs in the background. 
The coordinate names for the desktops are d1.1 for deskOne.pageOne.  
Desk 10 page 4 would be d10.4  

I name the desktop coordinates in my startup script so it's easy to 
remember which desktop is which. Like in the example above ("Tcltk=d10"). 
I do all my Tcl development on desktop 10.

I don't use the ~/GNUstep/Library/AfterStep/.workspace_state because 
that justloads any program you left running when you quit AS into 
DeskOne PageOne.

I created my own startup script that I launch from the autoexec.  In
the startup script I use "sleep" commands after the last program loaded 
to a specific desktop.  Otherwise, if it has not finished loading, it 
ends up on the next desktop that I start launching a program on. How 
long you have to set "sleep" depends on how fast your system is.

Here's the section of my database file that sets up pager coordinates 
for 12 four-paged desks in a 1280x1040 screen environment. Substitute 
1024 & 768 in the appropriate places if you are using a 1024x768 screen 
size.
# ------
#| 1 | 2 |
# ------- 
#| 3 | 4 |
# -------
#My Launcher Desk coordinates for a 1280x1040 screen
#with 12 Desk each with 4 pages
Style   "d1.1"          StartsOnDesk 0, ViewportX 0, ViewportY 0
Style   "d1.2"          StartsOnDesk 0, ViewportX 1280, ViewportY 0
Style   "d1.3"          StartsOnDesk 0, ViewportX 0, ViewportY 1024
Style   "d1.4"          StartsOnDesk 0, ViewportX 1280, ViewportY 1024
Style   "d2.1"          StartsOnDesk 1, ViewportX 0, ViewportY 0
Style   "d2.2"          StartsOnDesk 1, ViewportX 1280, ViewportY 0
Style   "d2.3"          StartsOnDesk 1, ViewportX 0, ViewportY 1024
Style   "d2.4"          StartsOnDesk 1, ViewportX 1280, ViewportY 1024
Style   "d3.1"          StartsOnDesk 2, ViewportX 0, ViewportY 0
Style   "d3.2"          StartsOnDesk 2, ViewportX 1280, ViewportY 0
Style   "d3.3"          StartsOnDesk 2, ViewportX 0, ViewportY 1024
Style   "d3.4"          StartsOnDesk 2, ViewportX 1280, ViewportY 1024
Style   "d4.1"          StartsOnDesk 3, ViewportX 0, ViewportY 0
Style   "d4.2"          StartsOnDesk 3, ViewportX 1280, ViewportY 0
Style   "d4.3"          StartsOnDesk 3, ViewportX 0, ViewportY 1024
Style   "d4.4"          StartsOnDesk 3, ViewportX 1280, ViewportY 1024
Style   "d5.1"          StartsOnDesk 4, ViewportX 0, ViewportY 0
Style   "d5.2"          StartsOnDesk 4, ViewportX 1280, ViewportY 0
Style   "d5.3"          StartsOnDesk 4, ViewportX 0, ViewportY 1024
Style   "d5.4"          StartsOnDesk 4, ViewportX 1280, ViewportY 1024
Style   "d6.1"          StartsOnDesk 5, ViewportX 0, ViewportY 0
Style   "d6.2"          StartsOnDesk 5, ViewportX 1280, ViewportY 0
Style   "d6.3"          StartsOnDesk 5, ViewportX 0, ViewportY 1024
Style   "d6.4"          StartsOnDesk 5, ViewportX 1280, ViewportY 1024
Style   "d7.1"          StartsOnDesk 6, ViewportX 0, ViewportY 0
Style   "d7.2"          StartsOnDesk 6, ViewportX 1280, ViewportY 0
Style   "d7.3"          StartsOnDesk 6, ViewportX 0, ViewportY 1024
Style   "d7.4"          StartsOnDesk 6, ViewportX 1280, ViewportY 1024
Style   "d8.1"          StartsOnDesk 7, ViewportX 0, ViewportY 0
Style   "d8.2"          StartsOnDesk 7, ViewportX 1280, ViewportY 0
Style   "d8.3"          StartsOnDesk 7, ViewportX 0, ViewportY 1024
Style   "d8.4"          StartsOnDesk 7, ViewportX 1280, ViewportY 1024
Style   "d9.1"          StartsOnDesk 8, ViewportX 0, ViewportY 0
Style   "d9.2"          StartsOnDesk 8, ViewportX 1280, ViewportY 0
Style   "d9.3"          StartsOnDesk 8, ViewportX 0, ViewportY 1024
Style   "d9.4"          StartsOnDesk 8, ViewportX 1280, ViewportY 1024
Style   "d10.1"         StartsOnDesk 9, ViewportX 0, ViewportY 0
Style   "d10.2"         StartsOnDesk 9, ViewportX 1280, ViewportY 0
Style   "d10.3"         StartsOnDesk 9, ViewportX 0, ViewportY 1024
Style   "d10.4"         StartsOnDesk 9, ViewportX 1280, ViewportY 1024
Style   "d11.1"         StartsOnDesk 10, ViewportX 0, ViewportY 0
Style   "d11.2"         StartsOnDesk 10, ViewportX 1280, ViewportY 0
Style   "d11.3"         StartsOnDesk 10, ViewportX 0, ViewportY 1024
Style   "d11.4"         StartsOnDesk 10, ViewportX 1280, ViewportY 1024
Style   "d12.1"         StartsOnDesk 11, ViewportX 0, ViewportY 0
Style   "d12.2"         StartsOnDesk 11, ViewportX 1280, ViewportY 0
Style   "d12.3"         StartsOnDesk 11, ViewportX 0, ViewportY 1024
Style   "d12.4"         StartsOnDesk 11, ViewportX 1280, ViewportY 1024


--
Greg Anderson
http://www.FutureRealms.com/

--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://www.caldera.com/linuxcenter/forums/afterstep.html