aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2015-09-07 17:17:02 +0200
committerMax Christian Pohle2015-09-07 17:17:02 +0200
commita50c48b6e1672267dd831972e76fd2130ef3b3e9 (patch)
treeb8e26053e908183abb6b77269eecc0902d60947e
parenta3c947dfffe39d66340c32ec90119a3bd20363a2 (diff)
downloadicons-a50c48b6e1672267dd831972e76fd2130ef3b3e9.tar.bz2
icons-a50c48b6e1672267dd831972e76fd2130ef3b3e9.zip
cleaned working directory and simplified installation, mimetype previews
now possible
-rw-r--r--Makefile22
-rw-r--r--doc/img/actions.jpgbin50930 -> 50923 bytes
-rw-r--r--doc/img/apps.jpgbin55962 -> 55952 bytes
-rw-r--r--doc/img/categories.jpgbin12688 -> 12687 bytes
-rw-r--r--doc/img/devices.jpgbin29607 -> 29607 bytes
-rw-r--r--doc/img/emblems.jpgbin15551 -> 15544 bytes
-rw-r--r--doc/img/mimetypes-templates.jpgbin0 -> 36608 bytes
-rw-r--r--doc/img/places.jpgbin32747 -> 32756 bytes
-rw-r--r--doc/img/status.jpgbin24971 -> 24978 bytes
-rw-r--r--doc/readme.md3
-rwxr-xr-xicons-mkdefaultsizes.sh (renamed from generate.sh)4
-rwxr-xr-xicons-mkmimetypes.sh (renamed from scalable/mimetypes/templates/generate.sh)21
-rw-r--r--scalable/mimetypes-templates/application-x-executable.png (renamed from scalable/mimetypes/templates/default/application-x-executable.png)bin194302 -> 194302 bytes
-rw-r--r--scalable/mimetypes-templates/application-xml-dtd.png (renamed from scalable/mimetypes/templates/default/application-xml-dtd.png)bin238889 -> 238889 bytes
-rw-r--r--scalable/mimetypes-templates/application.png (renamed from scalable/mimetypes/templates/default/application.png)bin161557 -> 161557 bytes
-rw-r--r--scalable/mimetypes-templates/audio.png (renamed from scalable/mimetypes/templates/default/audio.png)bin132002 -> 132002 bytes
-rw-r--r--scalable/mimetypes-templates/file.png (renamed from scalable/mimetypes/templates/default/file.png)bin166650 -> 166650 bytes
-rw-r--r--scalable/mimetypes-templates/image.png (renamed from scalable/mimetypes/templates/default/image.png)bin166650 -> 166650 bytes
-rw-r--r--scalable/mimetypes-templates/text-css.png (renamed from scalable/mimetypes/templates/default/text-css.png)bin165568 -> 165568 bytes
-rw-r--r--scalable/mimetypes-templates/text-x-chdr.png (renamed from scalable/mimetypes/templates/default/text-x-chdr.png)bin270482 -> 270482 bytes
-rw-r--r--scalable/mimetypes-templates/text-x-csrc.png (renamed from scalable/mimetypes/templates/default/text-x-csrc.png)bin270303 -> 270303 bytes
-rw-r--r--scalable/mimetypes-templates/text-x-generic.png (renamed from scalable/mimetypes/templates/default/text-x-generic.png)bin166650 -> 166650 bytes
-rw-r--r--scalable/mimetypes-templates/text-x-makefile.png (renamed from scalable/mimetypes/templates/default/text-x-makefile.png)bin137102 -> 137102 bytes
-rw-r--r--scalable/mimetypes-templates/text-x-script.png (renamed from scalable/mimetypes/templates/default/text-x-script.png)bin267918 -> 267918 bytes
-rw-r--r--scalable/mimetypes-templates/text.png (renamed from scalable/mimetypes/templates/default/text.png)bin107109 -> 107109 bytes
-rw-r--r--scalable/mimetypes-templates/video.png (renamed from scalable/mimetypes/templates/default/video.png)bin136691 -> 136691 bytes
-rw-r--r--scalable/mimetypes/templates/Makefile3
-rw-r--r--scalable/mimetypes/templates/test-globs4
28 files changed, 25 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index ac4cf99..7e5b4ab 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,19 @@
1all: clean 1all: actions apps categories devices emblems places status mimetypes-templates
2 make generate
3 2
4generate: preview.png versions update-cache 3%.png:
4 rm -f $@
5 5
6preview.png: 6%: %.png
7 #$(shell find "scalable/" -type f -name "*.png" -not -path ".git/*" -not -path 'scalable/animations/*' -not -path 'scalable/mimetypes/*' | sort | feh -m -y 96 -E 96 -s -p -b trans -O preview.png -f-) 7 $(shell /usr/bin/env montage -label '\n%t' $(shell find scalable/$(@) -type f) -tile 5 -background white -geometry 96x96+24+24 doc/img/$(@).jpg)
8 $(shell for path in $(ls -d scalable/*/); do montage -label '\n%t' $(find $path -type f) -tile 5 -background white -geometry 96x96+24+24 doc/img/$(echo $path | cut -d "/" -f2).jpg; done)
9 8
10preview_mimetypes.png: 9mimetypes:
11 $(shell find "scalable/mimetypes" -type f -name "*.png" | sort | feh -m -y 256 -E 256 -W 8192 -s -p -b trans -O preview_mimetypes.png -f-) 10 ./icons-mkmimetypes.sh /usr/share/mime/generic-icons
11 ./icons-mkmimetypes.sh /usr/share/mime/globs
12 12
13versions: 13resize:
14 find scalable/ -name '*.png' -exec ./generate.sh '{}' \; 14 find scalable/ -name '*.png' -exec ./icons-mkdefaultsizes.sh '{}' \;
15 15
16update-cache: 16iconcache:
17 gtk-update-icon-cache `pwd` 17 gtk-update-icon-cache `pwd`
18 18
19clean: 19clean:
diff --git a/doc/img/actions.jpg b/doc/img/actions.jpg
index 9aec71f..83102c5 100644
--- a/doc/img/actions.jpg
+++ b/doc/img/actions.jpg
Binary files differ
diff --git a/doc/img/apps.jpg b/doc/img/apps.jpg
index 1c57a3c..b0ba043 100644
--- a/doc/img/apps.jpg
+++ b/doc/img/apps.jpg
Binary files differ
diff --git a/doc/img/categories.jpg b/doc/img/categories.jpg
index 51dd56a..9208609 100644
--- a/doc/img/categories.jpg
+++ b/doc/img/categories.jpg
Binary files differ
diff --git a/doc/img/devices.jpg b/doc/img/devices.jpg
index 8c845db..2db6eaa 100644
--- a/doc/img/devices.jpg
+++ b/doc/img/devices.jpg
Binary files differ
diff --git a/doc/img/emblems.jpg b/doc/img/emblems.jpg
index f0d4673..756512b 100644
--- a/doc/img/emblems.jpg
+++ b/doc/img/emblems.jpg
Binary files differ
diff --git a/doc/img/mimetypes-templates.jpg b/doc/img/mimetypes-templates.jpg
new file mode 100644
index 0000000..f229bcc
--- /dev/null
+++ b/doc/img/mimetypes-templates.jpg
Binary files differ
diff --git a/doc/img/places.jpg b/doc/img/places.jpg
index 76f6946..3a09874 100644
--- a/doc/img/places.jpg
+++ b/doc/img/places.jpg
Binary files differ
diff --git a/doc/img/status.jpg b/doc/img/status.jpg
index b752b6f..235c3b8 100644
--- a/doc/img/status.jpg
+++ b/doc/img/status.jpg
Binary files differ
diff --git a/doc/readme.md b/doc/readme.md
index b4da9aa..db07ace 100644
--- a/doc/readme.md
+++ b/doc/readme.md
@@ -46,7 +46,8 @@ To use this theme <a href="http://git.entwicklerseite.de/icons/snapshot/icons-ma
46Mime type Icons can be dynamically generated for all file types. As a result 46Mime type Icons can be dynamically generated for all file types. As a result
47you gonna get hundreds of icons allowing you to easily distinguish between 47you gonna get hundreds of icons allowing you to easily distinguish between
48different file types. The generator uses templates, which you can see here: 48different file types. The generator uses templates, which you can see here:
49 49<br/>
50<img src="/icons/plain/doc/img/mimetypes-templates.jpg" />
50 51
51 52
52 53
diff --git a/generate.sh b/icons-mkdefaultsizes.sh
index d1737fb..6d4b756 100755
--- a/generate.sh
+++ b/icons-mkdefaultsizes.sh
@@ -2,8 +2,6 @@
2# invoke as ./generate.sh FILENAME 2# invoke as ./generate.sh FILENAME
3# it is used to generate smaller versions from the one found in scalable 3# it is used to generate smaller versions from the one found in scalable
4 4
5
6
7FILE=${1#scalable/} 5FILE=${1#scalable/}
8PATH=$(dirname $FILE) 6PATH=$(dirname $FILE)
9 7
@@ -12,7 +10,7 @@ do
12 /bin/mkdir -p "cache/$VERSION/$PATH" 10 /bin/mkdir -p "cache/$VERSION/$PATH"
13done 11done
14 12
15 13echo "$1..."
16/usr/bin/convert $1 \ 14/usr/bin/convert $1 \
17 \( -clone 0 -resize 16x16 -write cache/16x16/$FILE \) \ 15 \( -clone 0 -resize 16x16 -write cache/16x16/$FILE \) \
18 \( -clone 0 -resize 32x32 -write cache/32x32/$FILE \) \ 16 \( -clone 0 -resize 32x32 -write cache/32x32/$FILE \) \
diff --git a/scalable/mimetypes/templates/generate.sh b/icons-mkmimetypes.sh
index be8de9c..202dbd5 100755
--- a/scalable/mimetypes/templates/generate.sh
+++ b/icons-mkmimetypes.sh
@@ -1,8 +1,9 @@
1DEFAULT_FILE='file' # .png gets added automatically 1$TEMPLATE_FOLDER_FILE='file' # .png gets added automatically
2#INPUT_FILE=test-globs 2#INPUT_FILE=test-globs
3#INPUT_FILE=/usr/share/mime/generic-icons < /usr/share/mime/globs 3#INPUT_FILE=/usr/share/mime/generic-icons < /usr/share/mime/globs
4INPUT_FILE=$1 4INPUT_FILE=$1
5OUT_PATH="../" 5TEMPLATE_FOLDER='scalable/mimetypes-templates'
6OUT_PATH="scalable/mimetypes"
6 7
7MAX_LINES=`cat $INPUT_FILE | wc -l` 8MAX_LINES=`cat $INPUT_FILE | wc -l`
8CUR_LINE=0 9CUR_LINE=0
@@ -20,23 +21,23 @@ do
20 ((CUR_LINE++)) 21 ((CUR_LINE++))
21 printf "[%-4d/%-4d] checking for %s\n" "$CUR_LINE" "$MAX_LINES" "$FILE.png" 22 printf "[%-4d/%-4d] checking for %s\n" "$CUR_LINE" "$MAX_LINES" "$FILE.png"
22 23
23 if [[ -f "default/$FILE.png" ]]; then 24 if [[ -f "$TEMPLATE_FOLDER/$FILE.png" ]]; then
24 echo "using default." 25 echo "using $TEMPLATE_FOLDER"
25 cp "default/$FILE.png" "$OUT_PATH/$FILE.png" 26 cp "$TEMPLATE_FOLDER/$FILE.png" "$OUT_PATH/$FILE.png"
26 else 27 else
27 28
28 FIND=$FILE 29 FIND=$FILE
29 while [[ 1 ]] 30 while [[ 1 ]]
30 do 31 do
31 # printf "%s\n" $FIND 32 # printf "%s\n" $FIND
32 if [[ -f "default/$FIND.png" ]]; then break; fi 33 if [[ -f "$TEMPLATE_FOLDER/$FIND.png" ]]; then break; fi
33 34
34 if [[ "$FIND" == "${FIND%-*}" ]]; then FIND="$DEFAULT_FILE"; break; fi 35 if [[ "$FIND" == "${FIND%-*}" ]]; then FIND="$$TEMPLATE_FOLDER_FILE"; break; fi
35 FIND=${FIND%-*} 36 FIND=${FIND%-*}
36 done 37 done
37 38
38 # create default file... just in case there is no desktop file... 39 # create $TEMPLATE_FOLDER file... just in case there is no desktop file...
39 cp "default/$FIND.png" "$OUT_PATH/$FILE.png" 40 cp "$TEMPLATE_FOLDER/$FIND.png" "$OUT_PATH/$FILE.png"
40 41
41 DESKTOP=`xdg-mime query default $MIME` 42 DESKTOP=`xdg-mime query default $MIME`
42 if [[ -f /usr/share/applications/$DESKTOP ]]; then 43 if [[ -f /usr/share/applications/$DESKTOP ]]; then
@@ -47,7 +48,7 @@ do
47 48
48 if [[ "$APPICON" ]]; then 49 if [[ "$APPICON" ]]; then
49 convert \ 50 convert \
50 "default/$FIND.png" \( -density 400 $APPICON -resize 256 \) \ 51 "$TEMPLATE_FOLDER/$FIND.png" \( -density 400 $APPICON -resize 256 \) \
51 -gravity north -geometry +0+20 \ 52 -gravity north -geometry +0+20 \
52 -compose darken -composite $OUT_PATH/$FILE.png 53 -compose darken -composite $OUT_PATH/$FILE.png
53 fi 54 fi
diff --git a/scalable/mimetypes/templates/default/application-x-executable.png b/scalable/mimetypes-templates/application-x-executable.png
index 92c5515..92c5515 100644
--- a/scalable/mimetypes/templates/default/application-x-executable.png
+++ b/scalable/mimetypes-templates/application-x-executable.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/application-xml-dtd.png b/scalable/mimetypes-templates/application-xml-dtd.png
index 6e75df0..6e75df0 100644
--- a/scalable/mimetypes/templates/default/application-xml-dtd.png
+++ b/scalable/mimetypes-templates/application-xml-dtd.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/application.png b/scalable/mimetypes-templates/application.png
index 78ee865..78ee865 100644
--- a/scalable/mimetypes/templates/default/application.png
+++ b/scalable/mimetypes-templates/application.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/audio.png b/scalable/mimetypes-templates/audio.png
index 1271597..1271597 100644
--- a/scalable/mimetypes/templates/default/audio.png
+++ b/scalable/mimetypes-templates/audio.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/file.png b/scalable/mimetypes-templates/file.png
index 69fd3ec..69fd3ec 100644
--- a/scalable/mimetypes/templates/default/file.png
+++ b/scalable/mimetypes-templates/file.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/image.png b/scalable/mimetypes-templates/image.png
index 69fd3ec..69fd3ec 100644
--- a/scalable/mimetypes/templates/default/image.png
+++ b/scalable/mimetypes-templates/image.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text-css.png b/scalable/mimetypes-templates/text-css.png
index 64c2aa5..64c2aa5 100644
--- a/scalable/mimetypes/templates/default/text-css.png
+++ b/scalable/mimetypes-templates/text-css.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text-x-chdr.png b/scalable/mimetypes-templates/text-x-chdr.png
index 539f127..539f127 100644
--- a/scalable/mimetypes/templates/default/text-x-chdr.png
+++ b/scalable/mimetypes-templates/text-x-chdr.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text-x-csrc.png b/scalable/mimetypes-templates/text-x-csrc.png
index d55737a..d55737a 100644
--- a/scalable/mimetypes/templates/default/text-x-csrc.png
+++ b/scalable/mimetypes-templates/text-x-csrc.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text-x-generic.png b/scalable/mimetypes-templates/text-x-generic.png
index 69fd3ec..69fd3ec 100644
--- a/scalable/mimetypes/templates/default/text-x-generic.png
+++ b/scalable/mimetypes-templates/text-x-generic.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text-x-makefile.png b/scalable/mimetypes-templates/text-x-makefile.png
index bd48fd4..bd48fd4 100644
--- a/scalable/mimetypes/templates/default/text-x-makefile.png
+++ b/scalable/mimetypes-templates/text-x-makefile.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text-x-script.png b/scalable/mimetypes-templates/text-x-script.png
index 6eb0d88..6eb0d88 100644
--- a/scalable/mimetypes/templates/default/text-x-script.png
+++ b/scalable/mimetypes-templates/text-x-script.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/text.png b/scalable/mimetypes-templates/text.png
index 7d7cb76..7d7cb76 100644
--- a/scalable/mimetypes/templates/default/text.png
+++ b/scalable/mimetypes-templates/text.png
Binary files differ
diff --git a/scalable/mimetypes/templates/default/video.png b/scalable/mimetypes-templates/video.png
index 6527c94..6527c94 100644
--- a/scalable/mimetypes/templates/default/video.png
+++ b/scalable/mimetypes-templates/video.png
Binary files differ
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 @@
1all:
2 ./generate.sh /usr/share/mime/generic-icons
3 ./generate.sh /usr/share/mime/globs
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 @@
1text/x-csrc:*.c
2application/x-blender:*.blend
3text/plain:*.txt
4application/x-kexiproject-sqlite3:*.kkk
..