|Re: [Sawfish] How to distribute windows over different dektops|
[ Thread Index |
| More lists.tuxfamily.org/sawfish Archives
On 2016-02-03 Stefan Husmann wrote:
> I start X and sawfish over a .xinitrc, not using any display manager.
> I also start a few other programs that way, but they all appear on
> the first desktop. Can I use sawfish to distribute some programs over
> the desktops, for instance start program A and B on first desktop,
> program C on second and D on third one?
Hi! I do this exact thing, here's how:
in sawfish-conf -> window rules
Add one for each workspace(ws) (what you are calling a "desktop"). I
name the rules ws1, ws2, etc.
Matchers should be: role -> ws1
geometry check the workspace box and set the ws number to match the
name (i.e. 1).
Then in your scripts or whatever you use to launch all your programs
add --role='ws1' to each command line. For instance, I use:
gnome-terminal --geometry=175x28+1927+0 --role='ws4' -e 'tcsh -c\
"cd ~/Music/Fax && exec tcsh"'
To get me a window on ws 4 with a shell set to the directory I want.
That probably only works for gtk programs, though, as the --role switch
must be supported. If the program doesn't support --role then you need
to match with another method.
For xterms I match on window title, so I make a window rule to match
Name -> ^todo$
and call an xterm:
xterm -geometry 80x37+890+0 -T todo -e /bin/tcsh -c "nano -w ~/todo;\
exec /bin/tcsh" &
That's great when a program lets you set a title. If you can't set a
title but you're running just 1 of a program, you can match on the
default window name. If you run multiple windows of a program and
can't set a name, then you might be out of luck. You need to find some
way to set a unique id that sawfish can match on. Maybe others have
I also have another rule I call "sticky" (with no ws defined) which
allows me to open a window on all ws's ("sticky").
I have all my program starting command lines in 1 big script I call
"open-windows" that starts everything for me automatically, in the ws's
I want them, after I login.
I never use the "save my desktop" option when logging out as it never
works properly, never has, probably never will with my 16 ws's.