123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/sh
- NEXTWM="$1"
- PREVIOUSWM="`cat /etc/windowmanager`"
- [ "$NEXTWM" = "" ] && NEXTWM="$PREVIOUSWM"
- echo -n "$NEXTWM" > /etc/windowmanager
- echo -n "$NEXTWM" > /tmp/wmexitmode.txt
- KCNT=0
- PSPEFD="`ps -C pup_event_frontend_d | grep 'pup_event_front' | grep -v 'defunct'`"
- while [ "$PSPEFD" != "" ];do
- sleep 0.5
- KCNT=`expr $KCNT + 1`
- [ $KCNT -gt 60 ] && break
- PSPEFD="`ps -C pup_event_frontend_d | grep 'pup_event_front' | grep -v 'defunct'`"
- done
- sleep 0.2
- sync
- if [ "`pidof xfce4-panel`" != "" ];then
-
- kill `pidof xfce4-panel`
- exit
- fi
- kill -9 `pidof $PREVIOUSWM`
|