diff --git a/gtk/fantome/gtk-2.0/render-assets.sh b/gtk/fantome/gtk-2.0/render-assets.sh index 8ea2728..147cb23 100755 --- a/gtk/fantome/gtk-2.0/render-assets.sh +++ b/gtk/fantome/gtk-2.0/render-assets.sh @@ -1,24 +1,19 @@ -#! /bin/bash +#!/bin/bash INKSCAPE="/usr/bin/inkscape" OPTIPNG="/usr/bin/optipng" SRC_FILE="assets.svg" ASSETS_DIR="assets" - INDEX="listassets.txt" +echo "Rendering gtk2 assets" -for i in `cat $INDEX` -do - -if [ -f $ASSETS_DIR/$i.png ]; then - echo Rendering $ASSETS_DIR/$i.png +for i in `cat $INDEX`; do + echo "Rendering $ASSETS_DIR/$i.png" $INKSCAPE --export-id=$i \ --export-id-only \ --export-png=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null \ && $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png -fi - done cp $ASSETS_DIR/entry-toolbar.png menubar-toolbar/entry-toolbar.png diff --git a/gtk/fantome/gtk-3.0/assets.svg b/gtk/fantome/gtk-3.0/assets.svg index ba69d4f..9e0b033 100644 --- a/gtk/fantome/gtk-3.0/assets.svg +++ b/gtk/fantome/gtk-3.0/assets.svg @@ -3028,7 +3028,7 @@ style="display:inline" transform="translate(58,0)"> @@ -3141,7 +3141,7 @@ style="display:inline" transform="translate(58,0)"> @@ -3396,7 +3396,7 @@ r="7" cy="255" cx="1376" - style="fill:#f13039;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + style="fill:#color_2;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="path4068-7-5-4-9" /> @@ -5137,7 +5137,7 @@ style="display:inline" transform="translate(58,0)"> @@ -5246,7 +5246,7 @@ style="display:inline" transform="translate(58,0)"> diff --git a/gtk/fantome/gtk-3.0/render-assets.sh b/gtk/fantome/gtk-3.0/render-assets.sh index 4124ea6..8c7bf50 100755 --- a/gtk/fantome/gtk-3.0/render-assets.sh +++ b/gtk/fantome/gtk-3.0/render-assets.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/bash INKSCAPE="/usr/bin/inkscape" OPTIPNG="/usr/bin/optipng" @@ -6,15 +6,15 @@ OPTIPNG="/usr/bin/optipng" SRC_FILE="assets.svg" ASSETS_DIR="assets" INDEX="assets.txt" +echo "Rendering gtk3 assets" -for i in `cat $INDEX` -do - echo Rendering $ASSETS_DIR/$i.png +for i in `cat $INDEX`; do + echo "Rendering $ASSETS_DIR/$i.png" $INKSCAPE --export-id=$i \ --export-id-only \ --export-png=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null \ && $OPTIPNG -o7 --quiet $ASSETS_DIR/$i.png - echo Rendering $ASSETS_DIR/$i@2.png + echo "Rendering $ASSETS_DIR/$i@2.png" $INKSCAPE --export-id=$i \ --export-dpi=180 \ --export-id-only \ diff --git a/warnai b/warnai index fb44056..106178a 100755 --- a/warnai +++ b/warnai @@ -1,10 +1,11 @@ #!/bin/bash -dir=$HOME/.themes/colorizer/ +dir=$HOME/.themes/warna/ pwd=/usr/bin/pwd conf=$HOME/.config/ file=$HOME/.Xresources arr=() +prog_dir=`$pwd` fill_color(){ get_colors(){ @@ -42,7 +43,7 @@ ob_themer(){ for i in {1..8}; do sed -i s/"color_$i"/"$(get_colors $i)"/g "$dir"openbox-3/*; done - if [[ $(cat $HOME/.config/openbox/rc.xml | grep "colorize") ]]; then + if [[ $(cat $HOME/.config/openbox/rc.xml | grep "warna") ]]; then openbox --reconfigure elif [[ $(which obconf) ]]; then obconf >/dev/null 2>&1 @@ -67,6 +68,7 @@ gtk_themer(){ find "$dir"gtk-2.0/ -type f -exec sed -i s/"color_bg"/"${get_colors_bg}"/g {} \; find "$dir"gtk-2.0/menubar-toolbar/ -type f -exec sed -i s/"color_bg"/"${get_colors_bg}"/g {} \; find "$dir"gtk-3.0/ -type f -exec sed -i s/"color_bg"/"${get_colors_bg}"/g {} \; + for i in {1..8}; do find "$dir"gtk-2.0/ -type f -exec sed -i s/"color_$i"/"$(get_colors $i)"/g {} \;; find "$dir"gtk-2.0/menubar-toolbar/ -type f -exec sed -i s/"color_$i"/"$(get_colors $i)"/g {} \; @@ -77,9 +79,9 @@ gtk_themer(){ apply_theme(){ echo "Applying theme ..." xfconf-query -c xfwm4 -p /general/theme -s "adwaita" - xfconf-query -c xfwm4 -p /general/theme -s "colorizer" + xfconf-query -c xfwm4 -p /general/theme -s "warna" xfconf-query -c xsettings -p /Net/ThemeName -s "adwaita" - xfconf-query -c xsettings -p /Net/ThemeName -s "colorizer" + xfconf-query -c xsettings -p /Net/ThemeName -s "warna" echo "Done" notify-send "Done changing theme :)" } @@ -204,8 +206,8 @@ while [[ "$#" -gt 0 ]]; do done main() { - if [[ ! -d $HOME/.themes/colorizer ]]; then - mkdir $HOME/.themes/colorizer + if [[ ! -d $HOME/.themes/warna ]]; then + mkdir $HOME/.themes/warna fi echo "Generating theme ..." fill_color @@ -218,6 +220,11 @@ main() { gtk ) #echo "$gtk" $(gtk_themer $gtk) + cd "$dir"gtk-2.0/ + sh "$dir"gtk-2.0/render-assets.sh + cd "$dir"gtk-3.0/ + sh "$dir"gtk-3.0/render-assets.sh + cd $prog_dir ;; tint2 ) #echo "$tint2"