aboutsummaryrefslogtreecommitdiff
path: root/scalable/mimetypes
diff options
context:
space:
mode:
authorMax Christian Pohle2015-08-09 02:47:13 +0200
committerMax Christian Pohle2015-08-09 02:47:13 +0200
commit4d3b50949361c9725bab7b5dd07b592b11e5a120 (patch)
treedc685995977e99b51df71eea7b7cba559554ccfc /scalable/mimetypes
parentdfaf0d719188cbcb1adb0bf99ff709c3a8e2daa2 (diff)
downloadicons-4d3b50949361c9725bab7b5dd07b592b11e5a120.tar.bz2
icons-4d3b50949361c9725bab7b5dd07b592b11e5a120.zip
added gvim symbol and added generation script for mime type symbols (Makefile included)
Diffstat (limited to 'scalable/mimetypes')
-rw-r--r--scalable/mimetypes/templates/Makefile3
-rw-r--r--scalable/mimetypes/templates/default/application-x-executable.pngbin0 -> 194302 bytes
-rw-r--r--scalable/mimetypes/templates/default/application-xml-dtd.pngbin0 -> 238889 bytes
-rw-r--r--scalable/mimetypes/templates/default/application.pngbin0 -> 161557 bytes
-rw-r--r--scalable/mimetypes/templates/default/audio.pngbin0 -> 132002 bytes
-rw-r--r--scalable/mimetypes/templates/default/file.pngbin0 -> 166650 bytes
-rw-r--r--scalable/mimetypes/templates/default/image.pngbin0 -> 166650 bytes
-rw-r--r--scalable/mimetypes/templates/default/text-css.pngbin0 -> 165568 bytes
-rw-r--r--scalable/mimetypes/templates/default/text-x-chdr.pngbin0 -> 270482 bytes
-rw-r--r--scalable/mimetypes/templates/default/text-x-csrc.pngbin0 -> 270303 bytes
-rw-r--r--scalable/mimetypes/templates/default/text-x-generic.pngbin0 -> 166650 bytes
-rw-r--r--scalable/mimetypes/templates/default/text-x-makefile.pngbin0 -> 137102 bytes
-rw-r--r--scalable/mimetypes/templates/default/text-x-script.pngbin0 -> 267918 bytes
-rw-r--r--scalable/mimetypes/templates/default/text.pngbin0 -> 107109 bytes
-rw-r--r--scalable/mimetypes/templates/default/video.pngbin0 -> 136691 bytes
-rwxr-xr-xscalable/mimetypes/templates/generate.sh63
-rw-r--r--scalable/mimetypes/templates/test-globs4
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 @@
1all:
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 @@
1DEFAULT_FILE='file' # .png gets added automatically
2#INPUT_FILE=test-globs
3#INPUT_FILE=/usr/share/mime/generic-icons < /usr/share/mime/globs
4INPUT_FILE=$1
5OUT_PATH="../"
6
7MAX_LINES=`cat $INPUT_FILE | wc -l`
8CUR_LINE=0
9
10IFS=':'
11while read A B
12do
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
63done < $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 @@
1text/x-csrc:*.c
2application/x-blender:*.blend
3text/plain:*.txt
4application/x-kexiproject-sqlite3:*.kkk
..