I am working with MATLAB most of my time and I'd be happy to visually differ code files (.m), data files (.mat), figures (.fig). Quite an obvious thing that turns to be pretty peculiar.
Here I am now:
- added new mime entry
application/matlab m mat fig
in/etc/mime.types
- icons
matlab-m.png, matlab-fig.png, matlab-mat.png
are put into/usr/share/icons/gnome/8x8...512x512/mimetypes
(each folder correct size) and .svg with same names to/usr/share/icons/gnome/scalable/mimetypes
- put XML named
matlab.xml
in/usr/share/mime/packages
Here is my .xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/matlab-m">
<comment>Matlab source code</comment>
<glob pattern="*.m"/>
<icon name="matlab-m"/>
</mime-type>
<mime-type type="application/matlab-fig">
<comment>Matlab figure</comment>
<glob pattern="*.fig"/>
<icon name="matlab-fig"/>
</mime-type>
<mime-type type="application/matlab-mat">
<comment>matlab data</comment>
<glob pattern="*.mat"/>
<icon name="matlab-mat"/>
</mime-type>
</mime-info>
These actions didn't make system to read icons for .m and .fig files, but suddenly icon for .mat files is detected. Please show me where am I wrong.