aboutsummaryrefslogtreecommitdiffstats
path: root/test-dock.sh
blob: 4369383f91393ba2693ff19a374fc6e50b65e4b6 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/sh
# matchbox-panel test
#
# SPDX-License-Identifier: GPL-2.0-or-later

if [ -z $(which matchbox-panel|grep "/matchbox-panel") ]; then
   echo "$0: 'matchbox-panel' missing! Have you installed Matchbox properly?"
   exit 2 # 2 indicates mis-setup 
fi
if [ -z $(which mb-applet-system-monitor|grep "/mb-applet-system-monitor") ]; then
   echo "$0: matchbox panel applet(s) needed for testing are missing!"
   exit 2
fi

## have a client showing to check window decoration resizing is ok.
./winspew -t normal,normal &
WINPID=$!

# remove the old session info
rm -f ~/.matchbox/mbdock.session*123456
rm -f ~/.matchbox/mbdock.session*123457

## panel in titlebar

matchbox-panel --id 123457 --titlebar &
TITLEDOCKPID=$!

SYSTEM_TRAY_ID=123457 mb-applet-clock &
TITLEAPPPID=$!

## now each standard panel

matchbox-panel --id 123456 &
DOCKPID=$!

sleep 5

# launch some apps
SYSTEM_TRAY_ID=123456 mb-applet-system-monitor &
APPPID=$!

sleep 2

# remove it
kill $APPPID

sleep 5

#remove the panel
kill $DOCKPID

# relaunch at top with session 
matchbox-panel --orientation north --size 40 --id 123456 &

DOCKPID=$!

sleep 5

# launch some apps
SYSTEM_TRAY_ID=123456 mb-applet-system-monitor &
APPPID=$!

sleep 2

# remove it
kill $APPPID
kill $DOCKPID

## east panel

# relaunch at top with session 
matchbox-panel --orientation east --size 60 --id 123456 &

DOCKPID=$!

sleep 5

# launch some apps
SYSTEM_TRAY_ID=123456 mb-applet-system-monitor &
APPPID=$!

sleep 2

# remove it
kill $APPPID
kill $DOCKPID

# kill winspew
kill $WINPID

# kill titlebar panel

kill $TITLEDOCKPID
kill $TITLEAPPPID

exit 0