diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-10-01 18:10:58 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-10-01 18:10:58 (GMT) |
commit | 6aba3ca550cb34cc757c1df17ed271534d55ee38 (patch) | |
tree | a000f9e2487c14b43129a7e8aa0233a76bc329b5 /bin/sugar.in | |
parent | 293a3fc5a11fb4309eba4414702570b778508f4f (diff) |
sugar-emulator starts sugar out of Xephyr #1432
Diffstat (limited to 'bin/sugar.in')
-rw-r--r-- | bin/sugar.in | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/bin/sugar.in b/bin/sugar.in index 47cca31..094917f 100644 --- a/bin/sugar.in +++ b/bin/sugar.in @@ -1,5 +1,19 @@ #!/bin/sh +usage() { + cat <<EOF +Usage: sugar [OPTION].. + +Start Sugar window manager. + +Optional arguments. + -d, --display DISPLAY Display to start sugar + -s, --scaling SCALING Scale Sugar theme + Supported values: 72, 100 +EOF + exit 0 +} + init_cursor() { # have to reset cursor(metacity sets it on startup) # ugly but works @@ -9,6 +23,23 @@ init_cursor() { done } +while [ $# -ne 0 ] ; do + case "$1" in + -d | --display) + shift + export DISPLAY="$1" + ;; + -s | --scaling) + shift + export SUGAR_SCALING="$1" + ;; + -h | --help) + usage + ;; + esac + shift +done + if test -z "$SUGAR_SCALING"; then export SUGAR_SCALING=72 fi @@ -29,7 +60,7 @@ if [ -f ~/.sugar/debug ]; then fi echo Xcursor.theme: sugar | xrdb -merge -metacity --no-force-fullscreen & +metacity --no-force-fullscreen -d $DISPLAY & init_cursor & exec sugar-session |