From a50c48b6e1672267dd831972e76fd2130ef3b3e9 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 7 Sep 2015 17:17:02 +0200 Subject: cleaned working directory and simplified installation, mimetype previews now possible --- scalable/mimetypes/templates/Makefile | 3 - .../templates/default/application-x-executable.png | Bin 194302 -> 0 bytes .../templates/default/application-xml-dtd.png | Bin 238889 -> 0 bytes .../mimetypes/templates/default/application.png | Bin 161557 -> 0 bytes scalable/mimetypes/templates/default/audio.png | Bin 132002 -> 0 bytes scalable/mimetypes/templates/default/file.png | Bin 166650 -> 0 bytes scalable/mimetypes/templates/default/image.png | Bin 166650 -> 0 bytes scalable/mimetypes/templates/default/text-css.png | Bin 165568 -> 0 bytes .../mimetypes/templates/default/text-x-chdr.png | Bin 270482 -> 0 bytes .../mimetypes/templates/default/text-x-csrc.png | Bin 270303 -> 0 bytes .../mimetypes/templates/default/text-x-generic.png | Bin 166650 -> 0 bytes .../templates/default/text-x-makefile.png | Bin 137102 -> 0 bytes .../mimetypes/templates/default/text-x-script.png | Bin 267918 -> 0 bytes scalable/mimetypes/templates/default/text.png | Bin 107109 -> 0 bytes scalable/mimetypes/templates/default/video.png | Bin 136691 -> 0 bytes scalable/mimetypes/templates/generate.sh | 63 --------------------- scalable/mimetypes/templates/test-globs | 4 -- 17 files changed, 70 deletions(-) delete mode 100644 scalable/mimetypes/templates/Makefile delete mode 100644 scalable/mimetypes/templates/default/application-x-executable.png delete mode 100644 scalable/mimetypes/templates/default/application-xml-dtd.png delete mode 100644 scalable/mimetypes/templates/default/application.png delete mode 100644 scalable/mimetypes/templates/default/audio.png delete mode 100644 scalable/mimetypes/templates/default/file.png delete mode 100644 scalable/mimetypes/templates/default/image.png delete mode 100644 scalable/mimetypes/templates/default/text-css.png delete mode 100644 scalable/mimetypes/templates/default/text-x-chdr.png delete mode 100644 scalable/mimetypes/templates/default/text-x-csrc.png delete mode 100644 scalable/mimetypes/templates/default/text-x-generic.png delete mode 100644 scalable/mimetypes/templates/default/text-x-makefile.png delete mode 100644 scalable/mimetypes/templates/default/text-x-script.png delete mode 100644 scalable/mimetypes/templates/default/text.png delete mode 100644 scalable/mimetypes/templates/default/video.png delete mode 100755 scalable/mimetypes/templates/generate.sh delete mode 100644 scalable/mimetypes/templates/test-globs (limited to 'scalable/mimetypes') diff --git a/scalable/mimetypes/templates/Makefile b/scalable/mimetypes/templates/Makefile deleted file mode 100644 index f9ca85b..0000000 --- a/scalable/mimetypes/templates/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -all: - ./generate.sh /usr/share/mime/generic-icons - ./generate.sh /usr/share/mime/globs diff --git a/scalable/mimetypes/templates/default/application-x-executable.png b/scalable/mimetypes/templates/default/application-x-executable.png deleted file mode 100644 index 92c5515..0000000 Binary files a/scalable/mimetypes/templates/default/application-x-executable.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/application-xml-dtd.png b/scalable/mimetypes/templates/default/application-xml-dtd.png deleted file mode 100644 index 6e75df0..0000000 Binary files a/scalable/mimetypes/templates/default/application-xml-dtd.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/application.png b/scalable/mimetypes/templates/default/application.png deleted file mode 100644 index 78ee865..0000000 Binary files a/scalable/mimetypes/templates/default/application.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/audio.png b/scalable/mimetypes/templates/default/audio.png deleted file mode 100644 index 1271597..0000000 Binary files a/scalable/mimetypes/templates/default/audio.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/file.png b/scalable/mimetypes/templates/default/file.png deleted file mode 100644 index 69fd3ec..0000000 Binary files a/scalable/mimetypes/templates/default/file.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/image.png b/scalable/mimetypes/templates/default/image.png deleted file mode 100644 index 69fd3ec..0000000 Binary files a/scalable/mimetypes/templates/default/image.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text-css.png b/scalable/mimetypes/templates/default/text-css.png deleted file mode 100644 index 64c2aa5..0000000 Binary files a/scalable/mimetypes/templates/default/text-css.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text-x-chdr.png b/scalable/mimetypes/templates/default/text-x-chdr.png deleted file mode 100644 index 539f127..0000000 Binary files a/scalable/mimetypes/templates/default/text-x-chdr.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text-x-csrc.png b/scalable/mimetypes/templates/default/text-x-csrc.png deleted file mode 100644 index d55737a..0000000 Binary files a/scalable/mimetypes/templates/default/text-x-csrc.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text-x-generic.png b/scalable/mimetypes/templates/default/text-x-generic.png deleted file mode 100644 index 69fd3ec..0000000 Binary files a/scalable/mimetypes/templates/default/text-x-generic.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text-x-makefile.png b/scalable/mimetypes/templates/default/text-x-makefile.png deleted file mode 100644 index bd48fd4..0000000 Binary files a/scalable/mimetypes/templates/default/text-x-makefile.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text-x-script.png b/scalable/mimetypes/templates/default/text-x-script.png deleted file mode 100644 index 6eb0d88..0000000 Binary files a/scalable/mimetypes/templates/default/text-x-script.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/text.png b/scalable/mimetypes/templates/default/text.png deleted file mode 100644 index 7d7cb76..0000000 Binary files a/scalable/mimetypes/templates/default/text.png and /dev/null differ diff --git a/scalable/mimetypes/templates/default/video.png b/scalable/mimetypes/templates/default/video.png deleted file mode 100644 index 6527c94..0000000 Binary files a/scalable/mimetypes/templates/default/video.png and /dev/null differ diff --git a/scalable/mimetypes/templates/generate.sh b/scalable/mimetypes/templates/generate.sh deleted file mode 100755 index be8de9c..0000000 --- a/scalable/mimetypes/templates/generate.sh +++ /dev/null @@ -1,63 +0,0 @@ -DEFAULT_FILE='file' # .png gets added automatically -#INPUT_FILE=test-globs -#INPUT_FILE=/usr/share/mime/generic-icons < /usr/share/mime/globs -INPUT_FILE=$1 -OUT_PATH="../" - -MAX_LINES=`cat $INPUT_FILE | wc -l` -CUR_LINE=0 - -IFS=':' -while read A B -do - if [[ "$A" == "#"* ]]; then continue; fi - - MIME=$A - FILE=${A/\//-} - TEXT=${B/\*\./} - - - ((CUR_LINE++)) - printf "[%-4d/%-4d] checking for %s\n" "$CUR_LINE" "$MAX_LINES" "$FILE.png" - - if [[ -f "default/$FILE.png" ]]; then - echo "using default." - cp "default/$FILE.png" "$OUT_PATH/$FILE.png" - else - - FIND=$FILE - while [[ 1 ]] - do - # printf "%s\n" $FIND - if [[ -f "default/$FIND.png" ]]; then break; fi - - if [[ "$FIND" == "${FIND%-*}" ]]; then FIND="$DEFAULT_FILE"; break; fi - FIND=${FIND%-*} - done - - # create default file... just in case there is no desktop file... - cp "default/$FIND.png" "$OUT_PATH/$FILE.png" - - DESKTOP=`xdg-mime query default $MIME` - if [[ -f /usr/share/applications/$DESKTOP ]]; then - ICONTEXT=`grep -o 'Icon=.*' /usr/share/applications/$DESKTOP` - APPICON=`find ../../ /usr/share/icons/Adwaita/scalable /usr/share/icons/hicolor/scalable -path '*apps*' -name "${ICONTEXT/Icon=/}*" -type f -print -quit` - - printf "%-12s%s\t%s\t%s\t%s\n" "" $MIME $DESKTOP $FIND $APPICON - - if [[ "$APPICON" ]]; then - convert \ - "default/$FIND.png" \( -density 400 $APPICON -resize 256 \) \ - -gravity north -geometry +0+20 \ - -compose darken -composite $OUT_PATH/$FILE.png - fi - fi - fi - - mogrify "$OUT_PATH/$FILE.png" \ - -gravity northwest -pointsize 60 -rotate 90 \ - -stroke '#444' -strokewidth 2 -annotate 0 "${FILE##*-}" \ - -fill '#ff0' -annotate 0 "${FILE##*-}" \ - -rotate -90 -resize 256 $OUT_PATH/$FILE.png - -done < $INPUT_FILE diff --git a/scalable/mimetypes/templates/test-globs b/scalable/mimetypes/templates/test-globs deleted file mode 100644 index 9b062d7..0000000 --- a/scalable/mimetypes/templates/test-globs +++ /dev/null @@ -1,4 +0,0 @@ -text/x-csrc:*.c -application/x-blender:*.blend -text/plain:*.txt -application/x-kexiproject-sqlite3:*.kkk -- cgit v1.2.3