slitaz-tools rev 41
Fixed sed on wallpaper size (tazx)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Jan 14 22:27:31 2008 +0100 (2008-01-14) |
parents | a115e4798260 |
children | b466223ecac2 |
files | tinyutils/tazx |
line diff
1.1 --- a/tinyutils/tazx Mon Jan 14 21:08:46 2008 +0100 1.2 +++ b/tinyutils/tazx Mon Jan 14 22:27:31 2008 +0100 1.3 @@ -15,9 +15,9 @@ 1.4 1.5 exec 3>&1 1.6 value=`$DIALOG --help-button \ 1.7 - --clear \ 1.8 - --title " Start X on SliTaz " \ 1.9 - --menu \ 1.10 + --clear \ 1.11 + --title " Start X on SliTaz " \ 1.12 + --menu \ 1.13 "L'application 'tazx' vous permet configurer votre session X \ 1.14 sur votre système GNU/Linux. Syntaxe : \ 1.15 Ecran largeur x hauteur x nb-couleurs" 15 70 5 \ 1.16 @@ -39,23 +39,22 @@ 1.17 exec 3>&- 1.18 1.19 case $retval in 1.20 - 0) 1.21 - continue ;; 1.22 - 1) 1.23 - echo "Cancel pressed..." 1.24 - exit 0 ;; 1.25 - 2) 1.26 - $DIALOG --clear \ 1.27 - --title " Aide - Help " \ 1.28 - --textbox "$DOC" 15 70 1.29 - exec tazx ;; 1.30 - 255) 1.31 - if test -n "$value"; then 1.32 - echo "$value" 1.33 - else 1.34 - echo "ESC pressed..." 1.35 - exit 0 1.36 - fi ;; 1.37 + 0) 1.38 + continue ;; 1.39 + 1) 1.40 + echo "Cancel pressed..." 1.41 + exit 0 ;; 1.42 + 2) 1.43 + $DIALOG --clear \ 1.44 + --title " Aide - Help " --textbox "$DOC" 15 70 1.45 + exec tazx ;; 1.46 + 255) 1.47 + if test -n "$value"; then 1.48 + echo "$value" 1.49 + else 1.50 + echo "ESC pressed..." 1.51 + exit 0 1.52 + fi ;; 1.53 esac 1.54 1.55 # Set selected value. 1.56 @@ -69,14 +68,14 @@ 1.57 1.58 # Copy a JWM system config if any in present in user home 1.59 # and change backgroud image if the 3/4 is not respected. 1.60 -if [ ! -f "$HOME/.jwmrc" ] ; then 1.61 +if [ ! -f "$HOME/.jwmrc" ]; then 1.62 cp /etc/jwm/system.jwmrc $HOME/.jwmrc 1.63 fi 1.64 -if [ "$SCREEN" = "1280x1024x[0-9]" ] ; then 1.65 - sed -i s/'1024x768.png'/'1280x1024.png'/ $HOME/.jwmrc 1.66 +if echo $SCREEN | grep -q '1280x1024'; then 1.67 + sed -i s/'1024x768.png'/'1280x1024.png'/ $HOME/.jwmrc 1.68 fi 1.69 -if [ "$SCREEN" = "1024x768x[0-9]" ] ; then 1.70 - sed -i s/'1280x1024.png'/'1024x768.png'/ $HOME/.jwmrc 1.71 +if echo $SCREEN | grep -q '1024x768'; then 1.72 + sed -i s/'1280x1024.png'/'1024x768.png'/ $HOME/.jwmrc 1.73 fi 1.74 1.75 # Creat ~/.xsession to keep the configuration selected.