stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] Temporally replacing stumpwm with another window manager


From: Simias
Subject: Re: [STUMP] Temporally replacing stumpwm with another window manager
Date: Tue, 06 Feb 2007 03:50:30 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (berkeley-unix)

Tassilo Horn <address@hidden> writes:

> Hi all,
>
> sometimes, when I have to use programs that use multiple windows like
> GIMP, I don't like the tiling approach to manage windows. So it would be
> convenient to switch to twm for some minutes.
>
> Of course I don't want to lose the current windows while switching to
> twm or back to StumpWM. Is this possible?
>
> Bye,
> Tassilo

One solution would be to make a loop in your .xinitrc (or .xsession or
whatever script you call your wm from) like this one:

while :
do
  /path/to/stumpwm.sbcl
  twm
done

so when you quit stumpwm, twm is started, and once you exit this one,
you get stumpwm again. Of course, the problem is that it's an infinite
loop, so you can't exit X by exiting the current wm.
One solution is to hit ctrl-alt-backspace to force X to exit, or ask for
it, using xmessage for instance:

,----
| #!/bin/sh
|
| ask()
| {
|     xmessage -buttons "Switch to $1",'Exit X' 'What do you want to do?'
|     ret=$?
|     if [ $ret = '102' ] ; then
|       exit 0
|     fi
| }
|
| while :
| do
|     /path/to/stumpwm.sbcl
|     ask "twm"
|     twm
|     ask "stumpwm"
| done
`----

This script will pop up a window (using xmessage) asking for what to do
each time a window manager exits. This can be useful if stumpwm crashes
too, it's still alpha after all...

hope that helps,

-- 
Simias




reply via email to

[Prev in Thread] Current Thread [Next in Thread]