aboutsummaryrefslogtreecommitdiffstats
path: root/test-gconf.sh
blob: 832f0d7d7609048e374e5b6dc197229bf12ce475 (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
#!/bin/bash
#
# test-gconf.sh
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ====
#
# Tests gconf key shortcut settings.
#
# TODO
# - need to test more keys
# - figure out how to make in non-interactive
#     - cmp screen shots after moving ?


if [ -z "$(matchbox-window-manager -h | grep gconf | grep yes)" ]; then
   echo "$0: matchbox appears to lack gconf support. Exiting test."
   exit 2 # 2 indicates mis-setup 
fi
if [ -z $(which gconftool-2|grep "/gconftool-2") ]; then
   echo "$0: 'gconftool-2' missing."
   exit 2
fi
if [ \! -x sendkey ]; then
   echo "$0: 'sendkey' test utility missing, compile it first!"
   exit 2
fi

echo "Initial matchbox settings"
echo "===="
gconftool-2 -R /apps/matchbox
echo 
echo "===="
echo

echo "Now Setting cycle windows key to <alt>n"
gconftool-2 --set /apps/matchbox/global_keybindings/cycle_windows '<alt>n' --type string

echo "Checking it works ( focused window should change ) - hit RETURN"
read
./sendkey +alt n 

echo "Now Setting cycle windows key to <alt>N"
gconftool-2 --set /apps/matchbox/global_keybindings/cycle_windows '<alt>N' --type string

echo "Checking it works ( focused window should change ) - hit RETURN"
read
./sendkey +alt +shift n 

exit 0