diff -urN a/AwOken/awoken-icon-theme-customization b/AwOken/awoken-icon-theme-customization --- a/AwOken/awoken-icon-theme-customization 2011-10-27 12:13:46.000000000 -0500 +++ b/AwOken/awoken-icon-theme-customization 2011-12-22 09:11:12.279000144 -0600 @@ -14,6 +14,10 @@ CONFDIR="$HOME/.icons" # Path for the ppa installation: USRDIR="/usr/share/icons" +# Path to the documentation +DOCDIR="/usr/share/doc/awoken-icon-theme-$VER" +# Path to bin files +BINDIR="/usr/bin" echo "*************************************************************************" echo "Initial settings. Current Release: $VER" @@ -83,30 +87,30 @@ echo "You chose: $OPTION" #************************************************************************ if [ "$OPTION" = "Customize Clear version" ]; then - if [ -f $DIR/$ICNST/$ICNSTP-icon-theme-customization-clear ]; then + if [ -f $BINDIR/$ICNSTP-icon-theme-customization-clear ]; then echo "Now I'll run customization script for Clear version." echo "*************************************************************************" - bash $DIR/$ICNST/$ICNSTP-icon-theme-customization-clear + bash $BINDIR/$ICNSTP-icon-theme-customization-clear else - echo "It seems that there isn't any customization script for the clear iconset located in $DIR/$ICNST." + echo "It seems that there isn't any customization script for the clear iconset located in $BINDIR." fi #************************************************************************ elif [ "$OPTION" = "Customize Dark version" ]; then - if [ -f $DIR/$ICNST"Dark"/$ICNSTP-icon-theme-customization-dark ]; then + if [ -f $BINDIR/$ICNSTP-icon-theme-customization-dark ]; then echo "Now I'll run customization script for Dark version." echo "*************************************************************************" - bash $DIR/$ICNST"Dark"/$ICNSTP-icon-theme-customization-dark + bash $BINDIR/$ICNSTP-icon-theme-customization-dark else - echo "It seems that there isn't any customization script for the dark iconset located in $DIR/$ICNST"Dark. + echo "It seems that there isn't any customization script for the dark iconset located in $BINDIR." fi #************************************************************************ elif [ "$OPTION" = "Customize White version" ]; then - if [ -f $DIR/$ICNST"White"/$ICNSTP-icon-theme-customization-white ]; then + if [ -f $BINDIR/$ICNSTP-icon-theme-customization-white ]; then echo "Now I'll run customization script for White version." echo "*************************************************************************" - bash $DIR/$ICNST"White"/$ICNSTP-icon-theme-customization-white + bash $BINDIR/$ICNSTP-icon-theme-customization-white else - echo "It seems that there isn't any customization script for the dark iconset located in $DIR/$ICNST"White. + echo "It seems that there isn't any customization script for the dark iconset located in $BINDIR." fi #************************************************************************ elif [ "$OPTION" = "Colorize the iconset" ]; then @@ -156,8 +160,8 @@ # customize the set, so it re-prints the question elif [ "$OPTION" = "Take a look at the README pdf with instructions" ]; then echo "Now I'll open readme file (if xdg-open is supported)." - if [ -f $DIR/$ICNST/Installation_and_Instructions.pdf ]; then - xdg-open $DIR/$ICNST/Installation_and_Instructions.pdf & + if [ -f $DOCDIR/Installation_and_Instructions.pdf ]; then + xdg-open $DOCDIR/Installation_and_Instructions.pdf & else echo "Sorry, I cannot find the file, or xdg-open doesn't exist on your pc." fi diff -urN a/AwOken/extra/common.sh b/AwOken/extra/common.sh --- a/AwOken/extra/common.sh 1969-12-31 18:00:00.000000000 -0600 +++ b/AwOken/extra/common.sh 2011-12-22 09:11:12.279000144 -0600 @@ -0,0 +1,36 @@ +#!/bin/sh + +# usage: open PATH +function open() { + if [ -d "$1" ]; then + xdg-open $@ & + else + EXEC="$(xdg-mime query default image/png)" + + echo $EXEC | egrep -q '\.desktop$' + if [ $? -eq 0 ]; then + EXEC=$(cat $EXEC | egrep '^Exec=' | awk -F= '{print $2}') + REPLACE="s|%U|$@|g" + echo $EXEC | grep -q '%U' && EXEC=$(echo $EXEC | sed "$REPLACE") || EXEC="$EXEC $@" + else + EXEC="$EXEC $@" + fi + + $EXEC & + fi +} + +# usage: set_config FILE KEY VALUE +function set_config() { + FILE="$1" + KEY="$2" + VALUE="$3" + + egrep -q "^$KEY" "$FILE" + if [ $? -eq 0 ]; then + sed -i "s/\($KEY *=*\).*/\1'$VALUE'/" $FILE + else + echo "${KEY}=${VALUE}" >> $FILE + fi +} + diff -urN a/AwOken/extra/configure.sh b/AwOken/extra/configure.sh --- a/AwOken/extra/configure.sh 2011-10-27 12:13:46.000000000 -0500 +++ b/AwOken/extra/configure.sh 2011-12-22 09:11:12.280000125 -0600 @@ -5,6 +5,14 @@ VER="2.3" ICNST="AwOken" +if [ -e "/usr/share/icons/AwOken/extra/common.sh" ]; then + source "/usr/share/icons/AwOken/extra/common.sh" +elif [ -e "$HOME/.icons/AwOkenrc/extra/common.sh" ]; then + source "$HOME/.icons/AwOkenrc/extra/common.sh" +elif [ -e "$(dirname $0)/common.sh" ]; then + source "$(dirname $0)/common.sh" +fi + clear echo "*************************************************************************" echo "CONFIGURATION SCRIPT" @@ -21,7 +29,14 @@ echo "*************************************************************************" -cp $ICONSDIR/$RCFILE $CONFIG_FILE +if ! [ -e $CONFIG_FILE ]; then + if [ -e "$ICONSDIR/$RCFILE" ]; then + cp $ICONSDIR/$RCFILE $CONFIG_FILE + else + touch $CONFIG_FILE + fi +fi + source $CONFIG_FILE echo "Now I'll modify the configuration file located in $CONFIG_FILE." echo "*************************************************************************" @@ -35,9 +50,9 @@ elif [ "$TIPO" = "See icons before choosing them" ]; then CARTELLE="1) dark\t\t\t\t\t9) s11\n2) gray\t\t\t\t\t10) s11-original\n3) metal\t\t\t\t11) classy\n4) tlagdark\t\t\t\t12) sonetto\n5) tlaglight\t\t\t\t13) snowsabre\n6) token\t\t\t\t14) leaf\n7) violet\t\t\t\t15) See icons before choosing them\n8) white" echo -e $CARTELLE - xdg-open $ICONSDIR/clear/128x128/places & + open $ICONSDIR/clear/128x128/places else - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" TARGET_KEY="folder_sub_type" if [ $TIPO = "classy" ] || [ $TIPO = "snowsabre" ] || [ $TIPO = "leaf" ] || [ $TIPO = "s11" ] || [ $TIPO = "s11-original" ] || [ $TIPO = "sonetto" ]; then @@ -103,7 +118,7 @@ SOTTOTIPO="none" fi - sed -i "s/\($TARGET_KEY *=*\).*/\1'$SOTTOTIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$SOTTOTIPO" break fi done @@ -112,7 +127,7 @@ echo "What kind of start here icon do you prefer? I'll not show all 90 options, but if you want I'll open a window to see them (if xdg-open is supported). Do you want this (y/[n])?" read RISP if [ $RISP = "y" ]; then - xdg-open $ICONSDIR/clear/128x128/start-here & + open $ICONSDIR/clear/128x128/start-here fi TARGET_KEY="start_here" PS3="$TARGET_KEY? " @@ -124,7 +139,7 @@ read -p $PS3 TIPO done echo "Your choice was $TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" echo "*************************************************************************" echo "What kind of trash icon do you prefer? (Type the number of your choice)" TARGET_KEY="trash_type" @@ -135,10 +150,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & + open $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -152,7 +167,7 @@ echo "Wrong choice!" else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -167,10 +182,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/apps - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/gedit1.png $PERCORSO/gedit2.png & + open $PERCORSO/gedit1.png $PERCORSO/gedit2.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -182,10 +197,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & + open $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -197,10 +212,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & + open $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done diff -urN a/AwOken/extra/configurez.sh b/AwOken/extra/configurez.sh --- a/AwOken/extra/configurez.sh 2011-10-27 12:13:46.000000000 -0500 +++ b/AwOken/extra/configurez.sh 2011-12-22 09:11:12.280000125 -0600 @@ -5,6 +5,14 @@ VER="2.3" ICNST="AwOken" +if [ -e "/usr/share/icons/AwOken/extra/common.sh" ]; then + source "/usr/share/icons/AwOken/extra/common.sh" +elif [ -e "$HOME/.icons/AwOkenrc/extra/common.sh" ]; then + source "$HOME/.icons/AwOkenrc/extra/common.sh" +elif [ -e "$(dirname $0)/common.sh" ]; then + source "$(dirname $0)/common.sh" +fi + clear echo "*************************************************************************" echo "CONFIGURATION SCRIPT - ZENITY INSTALLED" @@ -21,7 +29,13 @@ echo "" -cp $ICONSDIR/$RCFILE $CONFIG_FILE +if ! [ -e $CONFIG_FILE ]; then + if [ -e $ICONSDIR/$RCFILE ]; then + cp $ICONSDIR/$RCFILE $CONFIG_FILE + else + touch $CONFIG_FILE + fi +fi source $CONFIG_FILE #echo "Now I'll modify the configuration file located in $CONFIG_FILE." @@ -43,11 +57,11 @@ #************************************************************************ # If you chose to see icons, open folder and re-ask the question: while [ "$TIPO" = "See icons before choosing them" ]; do - xdg-open $ICONSDIR/clear/128x128/places & + open $ICONSDIR/clear/128x128/places TIPO=`zenity --title="$ICNST $VER Customization script" --list --text="What kind of folder type do you prefer?\t\t\t\t\t\t" --radiolist --column "" --column "" FALSE "dark" FALSE "gray" FALSE "metal" FALSE "tlagdark" FALSE "tlaglight" FALSE "token" FALSE "violet" FALSE "white" FALSE "s11" FALSE "s11-original" FALSE "classy" FALSE "sonetto" FALSE "snowsabre" FALSE "leaf" --width="410" --height="405"` done -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" TARGET_KEY="folder_sub_type" @@ -84,7 +98,7 @@ fi echo -e "Your $TARGET_KEY choice was:\t$SOTTOTIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$SOTTOTIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$SOTTOTIPO" ############################################################################# # START HERE # @@ -94,7 +108,7 @@ RISP=`zenity --title="$ICNST $VER Customization script" --list --text="$QST" --radiolist --column "" --column "" FALSE "Yes" TRUE "No" --width="410" --height="250"` if [ "$RISP" = "Yes" ]; then - xdg-open $ICONSDIR/clear/128x128/start-here & + open $ICONSDIR/clear/128x128/start-here fi TIPO=`zenity --title="$ICNST $VER Customization script" --entry --text="Now type the name of the icon of choice.\nWARNING: type only the last part of the icon before file extension!!\nFor example, type 'gaia2' or 'centos' or 'arch4':"` @@ -106,7 +120,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # TRASH TYPE # @@ -118,7 +132,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & + open $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -127,7 +141,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # COLOR - NOCOLOR # @@ -143,7 +157,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # GEDIT # @@ -155,7 +169,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/apps - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/gedit1.png $PERCORSO/gedit2.png & + open $PERCORSO/gedit1.png $PERCORSO/gedit2.png & elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -164,7 +178,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # COMPUTER # @@ -176,7 +190,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & + open $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -185,7 +199,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # HOME # @@ -197,7 +211,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & + open $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -206,7 +220,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # END # diff -urN a/AwOken/extra/customize.sh b/AwOken/extra/customize.sh --- a/AwOken/extra/customize.sh 2011-10-22 09:26:42.000000000 -0500 +++ b/AwOken/extra/customize.sh 2011-12-22 09:11:12.281000106 -0600 @@ -315,8 +315,10 @@ changefolder $FOLDERTYPE $FOLDERSUBTYPE $ICONSET $ICONSDIR echo "The set is changed according to the $TARGET_KEY $FOLDERTYPE $FOLDERSUBTYPE option." -elif [ [ "$FOLDERTYPE" == "" ] || [ "$FOLDERSUBTYPE" == "" ] ] && [ [ "$FOLDERTYPE" != "" ] && [ "$FOLDERSUBTYPE" != "" ] ]; then - echo "WARNING: folder type and folder subtype needs to be coupled to get the script working.\nI'll not change folder icons." +elif [ "$FOLDERTYPE" == "" ] || [ "$FOLDERSUBTYPE" == "" ];then + if [ "$FOLDERTYPE" != "" ] && [ "$FOLDERSUBTYPE" != "" ]; then + echo "WARNING: folder type and folder subtype needs to be coupled to get the script working.\nI'll not change folder icons." + fi fi exit diff -urN a/AwOken/extra/recover.sh b/AwOken/extra/recover.sh --- a/AwOken/extra/recover.sh 2011-11-01 05:21:30.000000000 -0500 +++ b/AwOken/extra/recover.sh 2011-12-22 09:11:12.281000106 -0600 @@ -16,7 +16,7 @@ else cd ../ ICONSDIR=`pwd` - echo "I'm using this pathf for iconset in configuration process: $ICONSDIR" + echo "I'm using this path for iconset in configuration process: $ICONSDIR" fi echo "" diff -urN a/AwOkenDark/extra/configure.sh b/AwOkenDark/extra/configure.sh --- a/AwOkenDark/extra/configure.sh 2011-11-01 05:22:01.000000000 -0500 +++ b/AwOkenDark/extra/configure.sh 2011-12-22 09:11:12.282000091 -0600 @@ -5,6 +5,12 @@ VER="2.3" ICNST="AwOkenDark" +if [ -e "/usr/share/icons/AwOken/extra/common.sh" ]; then + source "/usr/share/icons/AwOken/extra/common.sh" +elif [ -e "$HOME/.icons/AwOkenrc/extra/common.sh" ]; then + source "$HOME/.icons/AwOkenrc/extra/common.sh" +fi + clear echo "*************************************************************************" echo "CONFIGURATION SCRIPT" @@ -35,9 +41,9 @@ elif [ "$TIPO" = "See icons before choosing them" ]; then CARTELLE="1) dark\t\t\t\t\t9) s11\n2) gray\t\t\t\t\t10) s11-original\n3) metal\t\t\t\t11) classy\n4) tlagdark\t\t\t\t12) sonetto\n5) tlaglight\t\t\t\t13) snowsabre\n6) token\t\t\t\t14) leaf\n7) violet\t\t\t\t15) See icons before choosing them\n8) white" echo -e $CARTELLE - xdg-open $ICONSDIR/clear/128x128/places & + open $ICONSDIR/clear/128x128/places else - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" TARGET_KEY="folder_sub_type" if [ $TIPO = "classy" ] || [ $TIPO = "snowsabre" ] || [ $TIPO = "leaf" ] || [ $TIPO = "s11" ] || [ $TIPO = "s11-original" ] || [ $TIPO = "sonetto" ]; then @@ -103,7 +109,7 @@ SOTTOTIPO="none" fi - sed -i "s/\($TARGET_KEY *=*\).*/\1'$SOTTOTIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$SOTTOTIPO" break fi done @@ -112,7 +118,7 @@ echo "What kind of start here icon do you prefer? I'll not show all 90 options, but if you want I'll open a window to see them (if xdg-open is supported). Do you want this (y/[n])?" read RISP if [ $RISP = "y" ]; then - xdg-open $ICONSDIR/clear/128x128/start-here & + open $ICONSDIR/clear/128x128/start-here fi TARGET_KEY="start_here" PS3="$TARGET_KEY? " @@ -124,7 +130,7 @@ read -p $PS3 TIPO done echo "Your choice was $TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" echo "*************************************************************************" echo "What kind of trash icon do you prefer? (Type the number of your choice)" TARGET_KEY="trash_type" @@ -135,10 +141,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & + open $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -152,7 +158,7 @@ echo "Wrong choice!" else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -167,10 +173,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/apps - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/gedit1.png $PERCORSO/gedit2.png & + open $PERCORSO/gedit1.png $PERCORSO/gedit2.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -182,10 +188,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & + open $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -197,10 +203,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & + open $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done diff -urN a/AwOkenDark/extra/configurez.sh b/AwOkenDark/extra/configurez.sh --- a/AwOkenDark/extra/configurez.sh 2011-11-01 05:22:01.000000000 -0500 +++ b/AwOkenDark/extra/configurez.sh 2011-12-22 09:11:12.282000091 -0600 @@ -5,6 +5,12 @@ VER="2.3" ICNST="AwOkenDark" +if [ -e "/usr/share/icons/AwOken/extra/common.sh" ]; then + source "/usr/share/icons/AwOken/extra/common.sh" +elif [ -e "$HOME/.icons/AwOkenrc/extra/common.sh" ]; then + source "$HOME/.icons/AwOkenrc/extra/common.sh" +fi + clear echo "*************************************************************************" echo "CONFIGURATION SCRIPT - ZENITY INSTALLED" @@ -43,11 +49,11 @@ #************************************************************************ # If you chose to see icons, open folder and re-ask the question: while [ "$TIPO" = "See icons before choosing them" ]; do - xdg-open $ICONSDIR/clear/128x128/places & + open $ICONSDIR/clear/128x128/places TIPO=`zenity --title="$ICNST $VER Customization script" --list --text="What kind of folder type do you prefer?\t\t\t\t\t\t" --radiolist --column "" --column "" FALSE "dark" FALSE "gray" FALSE "metal" FALSE "tlagdark" FALSE "tlaglight" FALSE "token" FALSE "violet" FALSE "white" FALSE "s11" FALSE "s11-original" FALSE "classy" FALSE "sonetto" FALSE "snowsabre" FALSE "leaf" --width="410" --height="405"` done -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" TARGET_KEY="folder_sub_type" @@ -84,7 +90,7 @@ fi echo -e "Your $TARGET_KEY choice was:\t$SOTTOTIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$SOTTOTIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$SOTTOTIPO" ############################################################################# # START HERE # @@ -94,7 +100,7 @@ RISP=`zenity --title="$ICNST $VER Customization script" --list --text="$QST" --radiolist --column "" --column "" FALSE "Yes" TRUE "No" --width="410" --height="250"` if [ "$RISP" = "Yes" ]; then - xdg-open $ICONSDIR/clear/128x128/start-here & + open $ICONSDIR/clear/128x128/start-here fi TIPO=`zenity --title="$ICNST $VER Customization script" --entry --text="Now type the name of the icon of choice.\nWARNING: type only the last part of the icon before file extension!!\nFor example, type 'gaia2' or 'centos' or 'arch4':"` @@ -106,7 +112,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # TRASH TYPE # @@ -118,7 +124,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & + open $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -127,7 +133,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # COLOR - NOCOLOR # @@ -143,7 +149,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # GEDIT # @@ -155,7 +161,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/apps - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/gedit1.png $PERCORSO/gedit2.png & + open $PERCORSO/gedit1.png $PERCORSO/gedit2.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -164,7 +170,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # COMPUTER # @@ -176,7 +182,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & + open $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -185,7 +191,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # HOME # @@ -197,7 +203,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & + open $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -206,7 +212,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # END # diff -urN a/AwOkenDark/extra/customize.sh b/AwOkenDark/extra/customize.sh --- a/AwOkenDark/extra/customize.sh 2011-11-01 05:22:01.000000000 -0500 +++ b/AwOkenDark/extra/customize.sh 2011-12-22 09:11:12.283000078 -0600 @@ -315,8 +315,10 @@ changefolder $FOLDERTYPE $FOLDERSUBTYPE $ICONSET $ICONSDIR echo "The set is changed according to the $TARGET_KEY $FOLDERTYPE $FOLDERSUBTYPE option." -elif [ [ "$FOLDERTYPE" == "" ] || [ "$FOLDERSUBTYPE" == "" ] ] && [ [ "$FOLDERTYPE" != "" ] && [ "$FOLDERSUBTYPE" != "" ] ]; then - echo "WARNING: folder type and folder subtype needs to be coupled to get the script working.\nI'll not change folder icons." +elif [ "$FOLDERTYPE" == "" ] || [ "$FOLDERSUBTYPE" == "" ]; then + if [ "$FOLDERTYPE" != "" ] && [ "$FOLDERSUBTYPE" != "" ]; then + echo "WARNING: folder type and folder subtype needs to be coupled to get the script working.\nI'll not change folder icons." + fi fi exit diff -urN a/AwOkenWhite/extra/configure.sh b/AwOkenWhite/extra/configure.sh --- a/AwOkenWhite/extra/configure.sh 2011-11-01 05:17:59.000000000 -0500 +++ b/AwOkenWhite/extra/configure.sh 2011-12-22 09:11:12.283000078 -0600 @@ -5,6 +5,12 @@ VER="2.3" ICNST="AwOkenWhite" +if [ -e "/usr/share/icons/AwOken/extra/common.sh" ]; then + source "/usr/share/icons/AwOken/extra/common.sh" +elif [ -e "$HOME/.icons/AwOkenrc/extra/common.sh" ]; then + source "$HOME/.icons/AwOkenrc/extra/common.sh" +fi + clear echo "*************************************************************************" echo "CONFIGURATION SCRIPT" @@ -35,9 +41,9 @@ elif [ "$TIPO" = "See icons before choosing them" ]; then CARTELLE="1) dark\t\t\t\t\t9) s11\n2) gray\t\t\t\t\t10) s11-original\n3) metal\t\t\t\t11) classy\n4) tlagdark\t\t\t\t12) sonetto\n5) tlaglight\t\t\t\t13) snowsabre\n6) token\t\t\t\t14) leaf\n7) violet\t\t\t\t15) See icons before choosing them\n8) white" echo -e $CARTELLE - xdg-open $ICONSDIR/clear/128x128/places & + open $ICONSDIR/clear/128x128/places else - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" TARGET_KEY="folder_sub_type" if [ $TIPO = "classy" ] || [ $TIPO = "snowsabre" ] || [ $TIPO = "leaf" ] || [ $TIPO = "s11" ] || [ $TIPO = "s11-original" ] || [ $TIPO = "sonetto" ]; then @@ -103,7 +109,7 @@ SOTTOTIPO="none" fi - sed -i "s/\($TARGET_KEY *=*\).*/\1'$SOTTOTIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$SOTTOTIPO" break fi done @@ -112,7 +118,7 @@ echo "What kind of start here icon do you prefer? I'll not show all 90 options, but if you want I'll open a window to see them (if xdg-open is supported). Do you want this (y/[n])?" read RISP if [ $RISP = "y" ]; then - xdg-open $ICONSDIR/clear/128x128/start-here & + open $ICONSDIR/clear/128x128/start-here fi TARGET_KEY="start_here" PS3="$TARGET_KEY? " @@ -124,7 +130,7 @@ read -p $PS3 TIPO done echo "Your choice was $TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" echo "*************************************************************************" echo "What kind of trash icon do you prefer? (Type the number of your choice)" TARGET_KEY="trash_type" @@ -135,10 +141,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & + open $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -152,7 +158,7 @@ echo "Wrong choice!" else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -167,10 +173,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/apps - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/gedit1.png $PERCORSO/gedit2.png & + open $PERCORSO/gedit1.png $PERCORSO/gedit2.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -182,10 +188,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & + open $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done @@ -197,10 +203,10 @@ echo "Wrong choice!" elif [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & + open $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png else echo "Your choice was: $TIPO" - sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE + set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" break fi done diff -urN a/AwOkenWhite/extra/configurez.sh b/AwOkenWhite/extra/configurez.sh --- a/AwOkenWhite/extra/configurez.sh 2011-11-01 05:17:59.000000000 -0500 +++ b/AwOkenWhite/extra/configurez.sh 2011-12-22 09:11:12.284000071 -0600 @@ -5,6 +5,12 @@ VER="2.3" ICNST="AwOkenWhite" +if [ -e "/usr/share/icons/AwOken/extra/common.sh" ]; then + source "/usr/share/icons/AwOken/extra/common.sh" +elif [ -e "$HOME/.icons/AwOkenrc/extra/common.sh" ]; then + source "$HOME/.icons/AwOkenrc/extra/common.sh" +fi + clear echo "*************************************************************************" echo "CONFIGURATION SCRIPT - ZENITY INSTALLED" @@ -43,11 +49,11 @@ #************************************************************************ # If you chose to see icons, open folder and re-ask the question: while [ "$TIPO" = "See icons before choosing them" ]; do - xdg-open $ICONSDIR/clear/128x128/places & + open $ICONSDIR/clear/128x128/places TIPO=`zenity --title="$ICNST $VER Customization script" --list --text="What kind of folder type do you prefer?\t\t\t\t\t\t" --radiolist --column "" --column "" FALSE "dark" FALSE "gray" FALSE "metal" FALSE "tlagdark" FALSE "tlaglight" FALSE "token" FALSE "violet" FALSE "white" FALSE "s11" FALSE "s11-original" FALSE "classy" FALSE "sonetto" FALSE "snowsabre" FALSE "leaf" --width="410" --height="405"` done -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" TARGET_KEY="folder_sub_type" @@ -84,7 +90,7 @@ fi echo -e "Your $TARGET_KEY choice was:\t$SOTTOTIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$SOTTOTIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$SOTTOTIPO" ############################################################################# # START HERE # @@ -94,7 +100,7 @@ RISP=`zenity --title="$ICNST $VER Customization script" --list --text="$QST" --radiolist --column "" --column "" FALSE "Yes" TRUE "No" --width="410" --height="250"` if [ "$RISP" = "Yes" ]; then - xdg-open $ICONSDIR/clear/128x128/start-here & + open $ICONSDIR/clear/128x128/start-here fi TIPO=`zenity --title="$ICNST $VER Customization script" --entry --text="Now type the name of the icon of choice.\nWARNING: type only the last part of the icon before file extension!!\nFor example, type 'gaia2' or 'centos' or 'arch4':"` @@ -106,7 +112,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # TRASH TYPE # @@ -118,7 +124,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png & + open $PERCORSO/user-trash1.png $PERCORSO/user-trash1-full.png $PERCORSO/user-trash2.png $PERCORSO/user-trash2-full.png $PERCORSO/user-trash3.png $PERCORSO/user-trash3-full.png $PERCORSO/user-trash4.png $PERCORSO/user-trash4-full.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -127,7 +133,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # COLOR - NOCOLOR # @@ -143,7 +149,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # GEDIT # @@ -155,7 +161,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/apps - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/gedit1.png $PERCORSO/gedit2.png & + open $PERCORSO/gedit1.png $PERCORSO/gedit2.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -164,7 +170,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # COMPUTER # @@ -176,7 +182,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png & + open $PERCORSO/user-desktop1.png $PERCORSO/user-desktop2.png $PERCORSO/user-desktop3.png $PERCORSO/user-desktop4.png $PERCORSO/user-desktop5.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -185,7 +191,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # HOME # @@ -197,7 +203,7 @@ while [ "$TIPO" = "See icons before choosing them" ] || [ "$TIPO" = "" ]; do if [ "$TIPO" = "See icons before choosing them" ]; then PERCORSO=$ICONSDIR/clear/128x128/places - `xdg-mime query default image/png | cut -d. -f1 ` $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png & + open $PERCORSO/user-home1.png $PERCORSO/user-home2.png $PERCORSO/user-home3.png $PERCORSO/user-home4.png $PERCORSO/user-home5.png elif [ "$TIPO" = "" ]; then zenity --warning --text="\nERROR: You selected nothing\!\nSelect a proper option." --title="ERROR" echo "You selected nothing! Select a proper option." @@ -206,7 +212,7 @@ done echo -e "Your $TARGET_KEY choice was:\t\t$TIPO" -sed -i "s/\($TARGET_KEY *=*\).*/\1'$TIPO'/" $CONFIG_FILE +set_config "$CONFIG_FILE" "$TARGET_KEY" "$TIPO" ############################################################################# # END # diff -urN a/AwOkenWhite/extra/customize.sh b/AwOkenWhite/extra/customize.sh --- a/AwOkenWhite/extra/customize.sh 2011-11-01 05:17:59.000000000 -0500 +++ b/AwOkenWhite/extra/customize.sh 2011-12-22 09:11:12.284000071 -0600 @@ -315,8 +315,10 @@ changefolder $FOLDERTYPE $FOLDERSUBTYPE $ICONSET $ICONSDIR echo "The set is changed according to the $TARGET_KEY $FOLDERTYPE $FOLDERSUBTYPE option." -elif [ [ "$FOLDERTYPE" == "" ] || [ "$FOLDERSUBTYPE" == "" ] ] && [ [ "$FOLDERTYPE" != "" ] && [ "$FOLDERSUBTYPE" != "" ] ]; then - echo "WARNING: folder type and folder subtype needs to be coupled to get the script working.\nI'll not change folder icons." +elif [ "$FOLDERTYPE" == "" ] || [ "$FOLDERSUBTYPE" == "" ]; then + if [ "$FOLDERTYPE" != "" ] && [ "$FOLDERSUBTYPE" != "" ]; then + echo "WARNING: folder type and folder subtype needs to be coupled to get the script working.\nI'll not change folder icons." + fi fi exit