4 SCREEN=${SCREEN:-640x480}
5 PROFILE=${PROFILE:-standard}
8 VALGRIND_LOG_FILE=${VALGRIND_LOG_FILE}
10 CALLGRIND=${CALLGRIND}
11 HOST_CURSOR=${HOST_CURSOR}
12 TEST_HOME=${TEST_HOME}
16 local x y screen_res screen_res_x screen_res_y div_x div_y single_res single_res_x single_res_y walker_x walker_y
22 # get your display resolution
23 screen_res="$( xdpyinfo | grep dimensions | awk '{print $2}' )"
24 screen_res_x="${screen_res%x*}"
25 screen_res_y="${screen_res#*x}"
27 # add some offset for your window-borders
28 screen_res_x="$(( ${screen_res_x} - 20 ))"
29 screen_res_y="$(( ${screen_res_y} - 40 ))"
32 SCREEN="${screen_res_x}x${screen_res_y}"
35 # which size per screen ?
36 single_res_x="$(( ${screen_res_x} / ${div_x} ))"
37 single_res_y="$(( ${screen_res_y} / ${div_y} ))"
38 single_res="${single_res_x}x${single_res_y}"
45 for (( y=0 ; $y < ${div_y} ; y++ )) ; do
46 for (( x=0 ; $x < ${div_x} ; x++ )) ; do
47 # add a new horizontal xinerama screen
48 xinerama_auto_args="${xinerama_auto_args} -fake-xinerama-screen ${single_res}+${walker_x}+${walker_y}"
49 walker_x="$(( ${walker_x} + ${single_res_x} ))"
51 # previous loop finished, set horizontal back to 0
53 # add a new vertical xinerama screen
54 walker_y="$(( ${walker_y} + ${single_res_y} ))"
57 #echo "${xinerama_auto_args}"
69 -c, --host-cursor Uses host-cursor, otherwise uses Xephyr's.
70 -d, --dpi=NUMBER states the dots-per-inch to be used.
71 -s, --screen=SPEC WIDTHxHEIGHT[xDEPTH] to be used.
72 -x, --fxs=WxH+X+Y Fake xinerama screen resolution
73 (can be applied repeatedly)
74 -ax 2x3 Automatic set of fake xineramas, 2 horizontal
75 screens per 3 of vertical ones
76 -p, --profile=NAME Enlightenment profile name.
77 -e, --empty-home[=PATH] Run with \$HOME being a new, empty directory at /tmp
82 --valgrind=MODE Run under valgrind to check for memory problems.
83 Same value as enlightenment_start, mode is "OR" of:
84 1 = plain valgrind to catch crashes (default)
85 2 = trace children (thumbnailer, efm slaves, ...)
87 8 = show reachable after processes finish.
89 --valgrind-log-file=FILENAME
90 Save valgrind log to file, see valgrind's
91 --log-file for details.
92 --massif Run under massif valgrind tool.
93 --callgrind Run under callgrind valgrind tool.
97 -v, --verbose Be verbose about what is being done.
98 -h, --help Show this help.
101 Useful or common options:
103 --dpi=142 --screen=240x320x16
104 --dpi=142 --screen=320x240x16
105 --dpi=186 --screen=272x480x16
106 --dpi=186 --screen=480x272x16
107 --dpi=181 --screen=320x320x16
108 --dpi=183 --screen=320x480x16 --host-cursor
109 --dpi=183 --screen=480x320x16 --host-cursor
110 --dpi=183 --screen=480x800x16
111 --dpi=183 --screen=800x480x16
112 --dpi=284 --screen=480x640x16
113 --dpi=284 --screen=640x480x16 --host-cursor
114 --dpi=183 --screen=960x400x16 --host-cursor
115 --dpi=284 --screen=480x800 --host-cursor
116 --dpi=284 --screen=480x640
117 --dpi=284 --screen=640x480
118 --dpi=181 --screen=320x320
119 --dpi=186 --screen=272x480
120 --dpi=142 --screen=240x320
121 --dpi=142 --screen=240x240 --host-cursor
126 while [ $# -gt 0 ]; do
129 option=`echo "'$arg'" | cut -d'=' -f1 | tr -d "'"`
130 value=`echo "'$arg'" | cut -d'=' -f2- | tr -d "'"`
131 if [ x"$value" = x"$option" ]; then
140 -v|-verbose|--verbose)
143 -e|-empty-home|--empty-home)
144 if [ -z "$value" ]; then
145 TEST_HOME="/tmp/e-test-${USER:-$UID}"
151 if [ -z "$value" ]; then
158 if [ -z "$value" ]; then
165 if [ -z "$value" ]; then
169 FAKE_XINERAMA_SCREEN="$FAKE_XINERAMA_SCREEN $value"
171 -p|-profile|--profile)
172 if [ -z "$value" ]; then
178 -c|-host-cursor|--host-cursor)
179 HOST_CURSOR="-host-cursor"
181 -valgrind|--valgrind)
182 if [ -z "$value" ]; then
188 -valgrind-log-file|--valgrind-log-file)
189 if [ -z "$value" ]; then
193 VALGRIND_LOG_FILE=$value
198 -callgrind|--callgrind)
201 -ax|-auto-xinerama|--auto-xinerama)
202 if [ -z "$value" ]; then
206 xinerama_auto_modes $value
209 echo "Unknown option: $option" 1>&2
216 if [ ! -z "$MASSIF" ]; then
221 if [ ! -z "$CALLGRIND" ]; then
222 DEBUGGER="-callgrind"
226 if [ ! -z "$VALGRIND" ]; then
227 DEBUGGER="-valgrind=$VALGRIND"
231 if [ $debuggers -gt 1 ]; then
232 echo "WARNING: more than one debugger specified. Using $DEBUGGER" 1>&2
235 if [ ! -z "$FAKE_XINERAMA_SCREEN" ]; then
236 for fxsm in $FAKE_XINERAMA_SCREEN; do
237 E_OPTIONS="$E_OPTIONS -fake-xinerama-screen $fxsm"
241 if [ ! -z "$TEST_HOME" ]; then
242 if [ "${TEST_HOME#/tmp/}" != "$TEST_HOME" ]; then
243 # just delete if inside /tmp
246 mkdir -p "$TEST_HOME"
249 unset E_RESTART E_START E_IPC_SOCKET E_START_TIME E_CONF_PROFILE E_PREFIX
251 if [ $VERBOSE -ne 0 ]; then
257 FAKE_XINERAMA_SCREEN=$FAKE_XINERAMA_SCREEN
259 HOST_CURSOR=$HOST_CURSOR
262 VALGRIND_LOG_FILE=$VALGRIND_LOG_FILE
270 Xephyr :1 -nolisten tcp -noreset -ac -br -dpi $DPI -screen $SCREEN $HOST_CURSOR &
274 [ ! -z "$TEST_HOME" ] && export HOME="$TEST_HOME"
275 enlightenment_start \
277 -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it \
279 $E_OPTIONS $xinerama_auto_args \