2e72edea552157ce423801f4f7f8b99bac8004ff
[easy-deb-chroot] / diablo / easy-chroot / src / usr / bin / window-hack-toggle
1 #!/bin/sh
2
3 # Toggle the Movable Window Hack for Easy Debian applications.
4 # (c) 2008 Alan Bruce (qole): GPL license.
5
6 # Shut down Matchbox Window Manager.
7
8 . /etc/osso-af-init/af-defines.sh
9 . /etc/osso-af-init/matchbox.defs
10 echo dialogmode=$DIALOGMODE 
11 echo stopping matchbox...
12 . /etc/osso-af-init/matchbox.sh stop
13
14 # Figure out what mode we're running in, and switch to the other one.
15
16 if [ ! "x`grep -i DIALOGMODE=free /etc/osso-af-init/matchbox.defs`" = "x" ] ; then
17  echo "free mode: switching to static."
18  sudo cp /etc/osso-af-init/matchbox.defs.orig /etc/osso-af-init/matchbox.defs
19  sudo cp /usr/bin/matchbox-window-manager.orig /usr/bin/matchbox-window-manager
20 else
21  echo "static mode: switching to free."
22  sudo cp /etc/osso-af-init/matchbox.defs.window-hack /etc/osso-af-init/matchbox.defs
23  sudo cp /usr/bin/matchbox-window-manager-matan /usr/bin/matchbox-window-manager
24 fi
25
26 # Start up Matchbox Window Manager again, with the new settings.
27
28 . /etc/osso-af-init/af-defines.sh
29 . /etc/osso-af-init/matchbox.defs
30 echo dialogmode=$DIALOGMODE 
31 echo starting matchbox...
32 . /etc/osso-af-init/matchbox.sh start