slitaz-tools rev 45
Improved tazx (more screen size and cmdline option for WM)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Feb 04 14:37:33 2008 +0100 (2008-02-04) |
parents | 452b60a05345 |
children | ed2ea4d4c373 |
files | tinyutils/tazx |
line diff
1.1 --- a/tinyutils/tazx Wed Jan 16 20:50:15 2008 +0100 1.2 +++ b/tinyutils/tazx Mon Feb 04 14:37:33 2008 +0100 1.3 @@ -3,7 +3,7 @@ 1.4 # Tazx - Ncurses startx script for SliTaz GNU/Linux using Dialog boxes. 1.5 # This tinyutils is part of slitaz-tools. 1.6 # 1.7 -# 20080114 <pankso@slitaz.org> - GNU gpl v3. 1.8 +# 20080204 <pankso@slitaz.org> - GNU gpl v3. 1.9 # 1.10 : ${DIALOG=dialog} 1.11 1.12 @@ -11,22 +11,25 @@ 1.13 XSERVER=Xvesa 1.14 DOC=/usr/share/doc/slitaz-tools/tazx.txt 1.15 MOUSE=/dev/input/mice,5 1.16 -WM=jwm 1.17 +WM=$1 1.18 +${WM:=jwm} 1.19 1.20 +# Main dialog. 1.21 exec 3>&1 1.22 value=`$DIALOG --help-button \ 1.23 - --clear \ 1.24 - --title " Start X on SliTaz " \ 1.25 + --clear --colors \ 1.26 + --title " Configure X " \ 1.27 --menu \ 1.28 -"L'application 'tazx' vous permet de configurer votre session X \ 1.29 -sur votre système GNU/Linux. Syntaxe : \ 1.30 -Ecran largeur x hauteur x nb-couleurs" 15 70 5 \ 1.31 +"L'application 'tazx' permet de configurer votre session X.\n\ 1.32 +Gestionnaire de fenêtres : \Z2$WM\Zn" 16 70 5 \ 1.33 "640x480x16" "TrueColor" \ 1.34 "640x480x24" "TrueColor" \ 1.35 "800x600x16" "TrueColor" \ 1.36 "800x600x24" "TrueColor" \ 1.37 "1024x768x16" "TrueColor" \ 1.38 "1024x768x24" "TrueColor" \ 1.39 +"1280x800x16" "TrueColor" \ 1.40 +"1280x800x24" "TrueColor" \ 1.41 "1280x1024x16" "TrueColor" \ 1.42 "1280x1024x24" "TrueColor" \ 1.43 "1600x1200x16" "TrueColor" \ 1.44 @@ -38,6 +41,7 @@ 1.45 retval=$? 1.46 exec 3>&- 1.47 1.48 +# Continue, exit or help... 1.49 case $retval in 1.50 0) 1.51 continue ;; 1.52 @@ -50,7 +54,7 @@ 1.53 exec tazx ;; 1.54 255) 1.55 if test -n "$value"; then 1.56 - echo "$value" 1.57 + continue 1.58 else 1.59 echo "ESC pressed..." 1.60 exit 0 1.61 @@ -60,41 +64,52 @@ 1.62 # Set selected value. 1.63 case $value in 1.64 xterm) 1.65 - Xvesa -ac -shadow -screen 1024x768x24 -br & 1.66 - exec xterm -cr green -geometry 80x35+0-0 ;; 1.67 + Xvesa -ac -shadow -screen 800x600x24 -br & 1.68 + exec xterm -cr orange -geometry 80x35+0-0 ;; 1.69 *) 1.70 SCREEN=$value ;; 1.71 esac 1.72 1.73 -# Copy a JWM system config if any in present in user home 1.74 -# and change backgroud image if the 3/4 is not respected. 1.75 +# Copy a JWM system config if any present in user home 1.76 if [ ! -f "$HOME/.jwmrc" ]; then 1.77 cp /etc/jwm/system.jwmrc $HOME/.jwmrc 1.78 fi 1.79 +# Change backgroud image if the 3/4 is not respected. 1.80 if echo $SCREEN | grep -q '1280x1024'; then 1.81 sed -i s/'1024x768.png'/'1280x1024.png'/ $HOME/.jwmrc 1.82 fi 1.83 if echo $SCREEN | grep -q '1024x768'; then 1.84 sed -i s/'1280x1024.png'/'1024x768.png'/ $HOME/.jwmrc 1.85 fi 1.86 +# Tile Wallpaper for 1280x800. 1.87 +if echo $SCREEN | grep -q '1280x800'; then 1.88 + sed -i s/'type="image"'/'type="tile"'/ $HOME/.jwmrc 1.89 +fi 1.90 + 1.91 +# e17 start with enlightenment_start. 1.92 +if [ "$WM" == "e17" ]; then 1.93 + WM=enlightenment_start 1.94 + XSEVER_OPTS="dpms -terminate" 1.95 +fi 1.96 1.97 # Creat ~/.xsession to keep the configuration selected. 1.98 # 1.99 -cat > $HOME/.xsession << EOT 1.100 +cat > $HOME/.xsession << _EOT_ 1.101 # ~/.xsession: Start X window session on your system. 1.102 # 1.103 -$XSERVER -ac -shadow -screen $SCREEN -mouse $MOUSE & 1.104 -sleep 1 & 1.105 -#xterm -bg khaki3 -fg white -cr orange -geometry 80x15+20+20 & 1.106 +$XSERVER -ac -shadow $XSEVER_OPTS -screen $SCREEN -mouse $MOUSE & 1.107 +#mpg123 sound.wav & 1.108 +#xterm -bg black -fg white -cr orange & 1.109 #xpad & 1.110 -#mpg123 sound.wav & 1.111 exec $WM 1.112 -EOT 1.113 +_EOT_ 1.114 1.115 chmod 700 $HOME/.xsession 1.116 1.117 -# End messages. 1.118 -echo "Configuration réussie." 1.119 -echo "Screen : $SCREEN" 1.120 +# Console messages. 1.121 +echo "X server : $XSERVER" 1.122 +echo "Screen : $SCREEN" 1.123 +echo "Exec WM : $WM" 1.124 +echo "" 1.125 1.126 exit 0