diff options
author | Max Christian Pohle | 2015-08-09 02:47:13 +0200 |
---|---|---|
committer | Max Christian Pohle | 2015-08-09 02:47:13 +0200 |
commit | 4d3b50949361c9725bab7b5dd07b592b11e5a120 (patch) | |
tree | dc685995977e99b51df71eea7b7cba559554ccfc /scalable/mimetypes | |
parent | dfaf0d719188cbcb1adb0bf99ff709c3a8e2daa2 (diff) | |
download | icons-4d3b50949361c9725bab7b5dd07b592b11e5a120.tar.bz2 icons-4d3b50949361c9725bab7b5dd07b592b11e5a120.zip |
added gvim symbol and added generation script for mime type symbols (Makefile included)
Diffstat (limited to 'scalable/mimetypes')
17 files changed, 70 insertions, 0 deletions
diff --git a/scalable/mimetypes/templates/Makefile b/scalable/mimetypes/templates/Makefile new file mode 100644 index 0000000..f9ca85b --- /dev/null +++ b/scalable/mimetypes/templates/Makefile | |||
@@ -0,0 +1,3 @@ | |||
1 | all: | ||
2 | ./generate.sh /usr/share/mime/generic-icons | ||
3 | ./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 new file mode 100644 index 0000000..92c5515 --- /dev/null +++ b/scalable/mimetypes/templates/default/application-x-executable.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/application-xml-dtd.png b/scalable/mimetypes/templates/default/application-xml-dtd.png new file mode 100644 index 0000000..6e75df0 --- /dev/null +++ b/scalable/mimetypes/templates/default/application-xml-dtd.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/application.png b/scalable/mimetypes/templates/default/application.png new file mode 100644 index 0000000..78ee865 --- /dev/null +++ b/scalable/mimetypes/templates/default/application.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/audio.png b/scalable/mimetypes/templates/default/audio.png new file mode 100644 index 0000000..1271597 --- /dev/null +++ b/scalable/mimetypes/templates/default/audio.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/file.png b/scalable/mimetypes/templates/default/file.png new file mode 100644 index 0000000..69fd3ec --- /dev/null +++ b/scalable/mimetypes/templates/default/file.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/image.png b/scalable/mimetypes/templates/default/image.png new file mode 100644 index 0000000..69fd3ec --- /dev/null +++ b/scalable/mimetypes/templates/default/image.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text-css.png b/scalable/mimetypes/templates/default/text-css.png new file mode 100644 index 0000000..64c2aa5 --- /dev/null +++ b/scalable/mimetypes/templates/default/text-css.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text-x-chdr.png b/scalable/mimetypes/templates/default/text-x-chdr.png new file mode 100644 index 0000000..539f127 --- /dev/null +++ b/scalable/mimetypes/templates/default/text-x-chdr.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text-x-csrc.png b/scalable/mimetypes/templates/default/text-x-csrc.png new file mode 100644 index 0000000..d55737a --- /dev/null +++ b/scalable/mimetypes/templates/default/text-x-csrc.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text-x-generic.png b/scalable/mimetypes/templates/default/text-x-generic.png new file mode 100644 index 0000000..69fd3ec --- /dev/null +++ b/scalable/mimetypes/templates/default/text-x-generic.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text-x-makefile.png b/scalable/mimetypes/templates/default/text-x-makefile.png new file mode 100644 index 0000000..bd48fd4 --- /dev/null +++ b/scalable/mimetypes/templates/default/text-x-makefile.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text-x-script.png b/scalable/mimetypes/templates/default/text-x-script.png new file mode 100644 index 0000000..6eb0d88 --- /dev/null +++ b/scalable/mimetypes/templates/default/text-x-script.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/text.png b/scalable/mimetypes/templates/default/text.png new file mode 100644 index 0000000..7d7cb76 --- /dev/null +++ b/scalable/mimetypes/templates/default/text.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/default/video.png b/scalable/mimetypes/templates/default/video.png new file mode 100644 index 0000000..6527c94 --- /dev/null +++ b/scalable/mimetypes/templates/default/video.png | |||
Binary files differ | |||
diff --git a/scalable/mimetypes/templates/generate.sh b/scalable/mimetypes/templates/generate.sh new file mode 100755 index 0000000..be8de9c --- /dev/null +++ b/scalable/mimetypes/templates/generate.sh | |||
@@ -0,0 +1,63 @@ | |||
1 | DEFAULT_FILE='file' # .png gets added automatically | ||
2 | #INPUT_FILE=test-globs | ||
3 | #INPUT_FILE=/usr/share/mime/generic-icons < /usr/share/mime/globs | ||
4 | INPUT_FILE=$1 | ||
5 | OUT_PATH="../" | ||
6 | |||
7 | MAX_LINES=`cat $INPUT_FILE | wc -l` | ||
8 | CUR_LINE=0 | ||
9 | |||
10 | IFS=':' | ||
11 | while read A B | ||
12 | do | ||
13 | if [[ "$A" == "#"* ]]; then continue; fi | ||
14 | |||
15 | MIME=$A | ||
16 | FILE=${A/\//-} | ||
17 | TEXT=${B/\*\./} | ||
18 | |||
19 | |||
20 | ((CUR_LINE++)) | ||
21 | printf "[%-4d/%-4d] checking for %s\n" "$CUR_LINE" "$MAX_LINES" "$FILE.png" | ||
22 | |||
23 | if [[ -f "default/$FILE.png" ]]; then | ||
24 | echo "using default." | ||
25 | cp "default/$FILE.png" "$OUT_PATH/$FILE.png" | ||
26 | else | ||
27 | |||
28 | FIND=$FILE | ||
29 | while [[ 1 ]] | ||
30 | do | ||
31 | # printf "%s\n" $FIND | ||
32 | if [[ -f "default/$FIND.png" ]]; then break; fi | ||
33 | |||
34 | if [[ "$FIND" == "${FIND%-*}" ]]; then FIND="$DEFAULT_FILE"; break; fi | ||
35 | FIND=${FIND%-*} | ||
36 | done | ||
37 | |||
38 | # create default file... just in case there is no desktop file... | ||
39 | cp "default/$FIND.png" "$OUT_PATH/$FILE.png" | ||
40 | |||
41 | DESKTOP=`xdg-mime query default $MIME` | ||
42 | if [[ -f /usr/share/applications/$DESKTOP ]]; then | ||
43 | ICONTEXT=`grep -o 'Icon=.*' /usr/share/applications/$DESKTOP` | ||
44 | APPICON=`find ../../ /usr/share/icons/Adwaita/scalable /usr/share/icons/hicolor/scalable -path '*apps*' -name "${ICONTEXT/Icon=/}*" -type f -print -quit` | ||
45 | |||
46 | printf "%-12s%s\t%s\t%s\t%s\n" "" $MIME $DESKTOP $FIND $APPICON | ||
47 | |||
48 | if [[ "$APPICON" ]]; then | ||
49 | convert \ | ||
50 | "default/$FIND.png" \( -density 400 $APPICON -resize 256 \) \ | ||
51 | -gravity north -geometry +0+20 \ | ||
52 | -compose darken -composite $OUT_PATH/$FILE.png | ||
53 | fi | ||
54 | fi | ||
55 | fi | ||
56 | |||
57 | mogrify "$OUT_PATH/$FILE.png" \ | ||
58 | -gravity northwest -pointsize 60 -rotate 90 \ | ||
59 | -stroke '#444' -strokewidth 2 -annotate 0 "${FILE##*-}" \ | ||
60 | -fill '#ff0' -annotate 0 "${FILE##*-}" \ | ||
61 | -rotate -90 -resize 256 $OUT_PATH/$FILE.png | ||
62 | |||
63 | done < $INPUT_FILE | ||
diff --git a/scalable/mimetypes/templates/test-globs b/scalable/mimetypes/templates/test-globs new file mode 100644 index 0000000..9b062d7 --- /dev/null +++ b/scalable/mimetypes/templates/test-globs | |||
@@ -0,0 +1,4 @@ | |||
1 | text/x-csrc:*.c | ||
2 | application/x-blender:*.blend | ||
3 | text/plain:*.txt | ||
4 | application/x-kexiproject-sqlite3:*.kkk | ||