From 75c6db32746edd0b3263b1d6fa33ede320517759 Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Mon, 22 Apr 2013 17:53:43 +0900 Subject: Tizen 2.1 release --- x-ui.sh | 280 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100755 x-ui.sh (limited to 'x-ui.sh') diff --git a/x-ui.sh b/x-ui.sh new file mode 100755 index 0000000..5b9d4e7 --- /dev/null +++ b/x-ui.sh @@ -0,0 +1,280 @@ +#!/usr/bin/env bash + +DPI=${DPI:-142} +SCREEN=${SCREEN:-640x480} +PROFILE=${PROFILE:-standard} +VERBOSE=${VERBOSE:-0} +VALGRIND=${VALGRIND} +VALGRIND_LOG_FILE=${VALGRIND_LOG_FILE} +MASSIF=${MASSIF} +CALLGRIND=${CALLGRIND} +HOST_CURSOR=${HOST_CURSOR} +TEST_HOME=${TEST_HOME} + +xinerama_auto_modes() +{ + 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 + + div_x="${1%x*}" + div_y="${1#*x}" + + + # get your display resolution + screen_res="$( xdpyinfo | grep dimensions | awk '{print $2}' )" + screen_res_x="${screen_res%x*}" + screen_res_y="${screen_res#*x}" + + # add some offset for your window-borders + screen_res_x="$(( ${screen_res_x} - 20 ))" + screen_res_y="$(( ${screen_res_y} - 40 ))" + + # set size for xephir + SCREEN="${screen_res_x}x${screen_res_y}" + + + # which size per screen ? + single_res_x="$(( ${screen_res_x} / ${div_x} ))" + single_res_y="$(( ${screen_res_y} / ${div_y} ))" + single_res="${single_res_x}x${single_res_y}" + + + walker_x=0 + walker_y=0 + + + for (( y=0 ; $y < ${div_y} ; y++ )) ; do + for (( x=0 ; $x < ${div_x} ; x++ )) ; do + # add a new horizontal xinerama screen + xinerama_auto_args="${xinerama_auto_args} -fake-xinerama-screen ${single_res}+${walker_x}+${walker_y}" + walker_x="$(( ${walker_x} + ${single_res_x} ))" + done + # previous loop finished, set horizontal back to 0 + walker_x=0 + # add a new vertical xinerama screen + walker_y="$(( ${walker_y} + ${single_res_y} ))" + done + + #echo "${xinerama_auto_args}" +} + +show_help() +{ + cat <&2 + ;; + esac +done + +debuggers=0 + +if [ ! -z "$MASSIF" ]; then + DEBUGGER="-massif" + ((debuggers++)) +fi + +if [ ! -z "$CALLGRIND" ]; then + DEBUGGER="-callgrind" + ((debuggers++)) +fi + +if [ ! -z "$VALGRIND" ]; then + DEBUGGER="-valgrind=$VALGRIND" + ((debuggers++)) +fi + +if [ $debuggers -gt 1 ]; then + echo "WARNING: more than one debugger specified. Using $DEBUGGER" 1>&2 +fi + +if [ ! -z "$FAKE_XINERAMA_SCREEN" ]; then + for fxsm in $FAKE_XINERAMA_SCREEN; do + E_OPTIONS="$E_OPTIONS -fake-xinerama-screen $fxsm" + done +fi + +if [ ! -z "$TEST_HOME" ]; then + if [ "${TEST_HOME#/tmp/}" != "$TEST_HOME" ]; then + # just delete if inside /tmp + rm -fr "$TEST_HOME/" + fi + mkdir -p "$TEST_HOME" +fi + +unset E_RESTART E_START E_IPC_SOCKET E_START_TIME E_CONF_PROFILE E_PREFIX + +if [ $VERBOSE -ne 0 ]; then + cat <