aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zaurusd/files/zaurus-hinge.matchbox-landscape
blob: 32710b2a67354fc5a8cbe4eb4e6c69fa938880c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  #!/bin/sh
  
  # As matchbox-panel updates its written configuration right after an applet dies / is killed, we can not be sure
  # whether the user had gpe-panel in his preferences after rotating to portrait. And since there is a slim chance
  # that a user changes his preferences from time to time, we renew that dumped configuration every now and then ;)

  if ! test -e "/tmp/gpe-panel.session-$panel_user"
  then
    test -e /home/$panel_user/.matchbox/mbdock.session && cp /home/$panel_user/.matchbox/mbdock.session "/tmp/gpe-panel.session-$panel_user"
    test -e "/tmp/gpe-panel.session-$panel_user" && cat "/tmp/gpe-panel.session-$panel_user" | grep -q panel || killproc ${ZD_BINDIR}/mbinputmgr
  else
    cat "/tmp/gpe-panel.session-$panel_user" | grep -q panel || killproc ${ZD_BINDIR}/mbinputmgr
    rm "/tmp/gpe-panel.session-$panel_user"
  fi
   
  # urg mbinputmgr should kill below
  killproc ${ZD_BINDIR}/matchbox-keyboard
  killproc ${ZD_BINDIR}/matchbox-stroke
  
  if [ -x ${ZD_BINDIR}/xrandr ]; then
  	if ! ( xrandr | awk '{print $4}' | grep -q $XRANDR_LANDSCAPE )
	then
		${ZD_BINDIR}/xrandr -o $XRANDR_LANDSCAPE
	fi
  fi