From 95ff39872ab6165945d108ebef386fda89530d46 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 28 Jun 2007 15:35:37 +0000 Subject: [PATCH] Added size magic for browser git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6739 594d385d-05f5-0310-b6e9-bd551577e9d8 --- contrib/scripts/start-gosa.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/contrib/scripts/start-gosa.sh b/contrib/scripts/start-gosa.sh index 556a0fd9a..c3976ed81 100755 --- a/contrib/scripts/start-gosa.sh +++ b/contrib/scripts/start-gosa.sh @@ -47,6 +47,20 @@ if [ ! -d $HOME/.mozilla/$dbrowser/*.gosa ]; then config=`echo $HOME/.mozilla/$dbrowser/*.gosa/` fi + # Catch resolution + width=1024 + height=768 + if which xrandr > /dev/null; then + if xrandr 1> /dev/null 2> /dev/null; then + resolution=$(xrandr | sed -n '/current/s/^.*current \([0-9]*\)[^0-9]*\([0-9]*\).*$/\1 \2/p') + width=${resolution%% *} + height=${resolution##* } + + [ $width -gt 1050 ] && width=1050 + [ $height -gt 850 ] && height=850 + fi + fi + cat << EOF > $config/prefs.js # Mozilla User Preferences @@ -142,8 +156,8 @@ cat << EOF > $config/localstore.rdf screenX="50" screenY="25" sizemode="normal" - width="1000" - height="760" /> + width="$width" + height="$height" /> -- 2.30.2