summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/aliases/suffix27
-rw-r--r--etc/dircolors111
-rwxr-xr-xinclude/mimetypes32
3 files changed, 124 insertions, 46 deletions
diff --git a/etc/aliases/suffix b/etc/aliases/suffix
index d86d8a4..9a2f1bc 100644
--- a/etc/aliases/suffix
+++ b/etc/aliases/suffix
@@ -3,30 +3,33 @@
## vim:ft=zsh
# part 1: what filetypes to open whith what app?
# List of filetypes covered by aliases
-filetypes=(archive audio midi video image document raw office emul web)
+filetypes=(archive audio document emul image midi office raw video web)
# File extensions
archive_formats=(tar.bz2 tar.gz tar bz2 gz zip rar)
-audio_formats=(flac mp3 ogg wav wma)
-midi_formats=(mid s3m)
-video_formats=(avi divx flv m4v mkv mp4 mpg mpeg ogm wmv)
-image_formats=(bmp jpg jpeg gif png)
+audio_formats=(aif aifc aiff amr amr au awb awb axa flac gsm kar m3u m3u m4a mid
+ midi mp2 mp3 mpega mpga oga ogg pls ra ra ram rm sd2 sid snd spx wav wax wma)
document_formats=(pdf ps)
-raw_formats=(conf ini log txt htm html xhtml c cpp lst)
-office_formats=(doc odt ott rtf sxw)
emul_formats=(exe)
+image_formats=(art bmp cdr cdt cpt djv djvu gif ico ief jng jpe jpeg jpg pat pbm
+ pcx pgm png pnm ppm psd ras rgb svg svgz tif tiff wbmp xbm xpm xwd)
+midi_formats=(mid s3m)
+office_formats=(doc odt ott rtf sxw)
+raw_formats=(conf ini log txt htm html xhtml c cpp lst)
+video_formats=(3gp asf asx avi axv dif dl dv fli flv gl lsf lsx mng mov movie mp4
+ mpe mpeg mpg mpv mxu ogv qt wm wmv wmx wvx)
web_formats=(com de net org)
# Applications
archive_app='extr'
audio_app='mplayer'
-video_app='mplayer'
-midi_app='timidity'
-image_app='feh'
document_app='kpdf'
-raw_app='vim'
-office_app='openoffice'
emul_app='wine'
+image_app='feh'
+midi_app='timidity'
+office_app='openoffice'
+raw_app='vim'
+video_app='mplayer'
web_app='x-www-browser'
# part 2: create the aliases
diff --git a/etc/dircolors b/etc/dircolors
index c6ec101..8515ff0 100644
--- a/etc/dircolors
+++ b/etc/dircolors
@@ -118,60 +118,103 @@ EXEC 01;32
.7z 04;31
.rz 04;31
# images (yellow)
-.jpg 04;33
-.jpeg 04;33
-.gif 04;33
+.art 04;33
.bmp 04;33
+.cdr 04;33
+.cdt 04;33
+.cpt 04;33
+.djv 04;33
+.djvu 04;33
+.gif 04;33
+.ico 04;33
+.ief 04;33
+.jng 04;33
+.jpe 04;33
+.jpeg 04;33
+.jpg 04;33
+.pat 04;33
.pbm 04;33
+.pcx 04;33
.pgm 04;33
+.png 04;33
+.pnm 04;33
.ppm 04;33
-.tga 04;33
-.xbm 04;33
-.xpm 04;33
+.psd 04;33
+.ras 04;33
+.rgb 04;33
+.svg 04;33
+.svgz 04;33
.tif 04;33
.tiff 04;33
-.png 04;33
-.svg 04;33
-.mng 04;33
-.pcx 04;33
-.xcf 04;33
+.wbmp 04;33
+.xbm 04;33
+.xpm 04;33
+.xwd 04;33
# videos (green)
-.mov 04;32
-.mpg 04;32
-.mpeg 04;32
-.m2v 04;32
-.mkv 04;32
-.ogm 04;32
-.mp4 04;32
-.m4v 04;32
-.mp4v 04;32
-.vob 04;32
-.qt 04;32
-.nuv 04;32
-.wmv 04;32
+.3gp 04;32
.asf 04;32
-.rm 04;32
-.rmvb 04;32
-.flc 04;32
+.asx 04;32
.avi 04;32
-.divx 04;32
+.axv 04;32
+.dif 04;32
+.dl 04;32
+.dv 04;32
.fli 04;32
+.flv 04;32
.gl 04;32
-.dl 04;32
-.xwd 04;32
-.yuv 04;32
+.lsf 04;32
+.lsx 04;32
+.mng 04;32
+.mov 04;32
+.movie 04;32
+.mp4 04;32
+.mpe 04;32
+.mpeg 04;32
+.mpg 04;32
+.mpv 04;32
+.mxu 04;32
+.ogv 04;32
+.qt 04;32
+.wm 04;32
+.wmv 04;32
+.wmx 04;32
+.wvx 04;32
# audio (cyan)
-.aac 04;36
+.aif 04;36
+.aifc 04;36
+.aiff 04;36
+.amr 04;36
+.amr 04;36
.au 04;36
+.awb 04;36
+.awb 04;36
+.axa 04;36
.flac 04;36
+.gsm 04;36
+.kar 04;36
+.m3u 04;36
+.m3u 04;36
+.m4a 04;36
.mid 04;36
.midi 04;36
-.mka 04;36
+.mp2 04;36
.mp3 04;36
-.mpc 04;36
+.mpega 04;36
+.mpga 04;36
+.oga 04;36
.ogg 04;36
+.pls 04;36
+.ra 04;36
.ra 04;36
+.ram 04;36
+.rm 04;36
+.sd2 04;36
+.sid 04;36
+.snd 04;36
+.spx 04;36
.wav 04;36
+.wax 04;36
+.wma 04;36
# document formats, not plain text! (white)
.odt 04
.pdf 04
diff --git a/include/mimetypes b/include/mimetypes
new file mode 100755
index 0000000..5a7f92b
--- /dev/null
+++ b/include/mimetypes
@@ -0,0 +1,32 @@
+#!/usr/bin/env zsh
+typeset -a audio video image
+typeset c_audio='04;36' c_video='04;32' c_image='04;33'
+
+while read mime extensions; do
+ [[ $mime == audio/* ]] && audio+=(${(s/ /)extensions})
+ [[ $mime == video/* ]] && video+=(${(s/ /)extensions})
+ [[ $mime == image/* ]] && image+=(${(s/ /)extensions})
+done < /etc/mime.types
+
+audio=(${(i)audio})
+video=(${(i)video})
+image=(${(i)image})
+
+echo "## dircolors"
+echo "# audio"
+for type in $audio; {
+ echo ".$type $c_audio"
+}
+echo "\n# video"
+for type in $video; {
+ echo ".$type $c_video"
+}
+echo "\n# images"
+for type in $image; {
+ echo ".$type $c_image"
+}
+
+echo "\n\n## suffix aliases"
+echo "audio_formats=($audio)"
+echo "video_formats=($video)"
+echo "image_formats=($image)"