Last active
March 17, 2018 08:36
-
-
Save railwaycat/39d6fd4b865a39a10b819e18ca151feb to your computer and use it in GitHub Desktop.
patch for document.icns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git mac/templates/Info.plist.in mac/templates/Info.plist.in | |
index d4b033c659..fe46ab29d8 100644 | |
--- mac/templates/Info.plist.in | |
+++ mac/templates/Info.plist.in | |
@@ -21,12 +21,475 @@ along with GNU Emacs Mac port. If not, see <http://www.gnu.org/licenses/>. | |
--> | |
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> | |
-<plist version="0.9"> | |
+<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleDocumentTypes</key> | |
<array> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>text</string> | |
+ <string>txt</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Plain text document</string> | |
+ <key>CFBundleTypeOSTypes</key> | |
+ <array> | |
+ <string>TEXT</string> | |
+ <string>utxt</string> | |
+ </array> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>html</string> | |
+ <string>htm</string> | |
+ <string>shtm</string> | |
+ <string>shtml</string> | |
+ <string>jsp</string> | |
+ <string>asp</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>HTML document</string> | |
+ <key>CFBundleTypeOSTypes</key> | |
+ <array> | |
+ <string>HTML</string> | |
+ </array> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>markdown</string> | |
+ <string>mkdn</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Markdown document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>css</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>CSS style sheet</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>xhtml</string> | |
+ <string>xhtm</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>XHTML document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>xml</string> | |
+ <string>xsl</string> | |
+ <string>xslt</string> | |
+ <string>xbl</string> | |
+ <string>xul</string> | |
+ <string>rdf</string> | |
+ <string>dtd</string> | |
+ <string>xsd</string> | |
+ <string>xsdl</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>XML document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>sgml</string> | |
+ <string>sgm</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>SGML document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>yml</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>YAML document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>js</string> | |
+ <string>JS</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>JavaScript script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>php</string> | |
+ <string>php3</string> | |
+ <string>php4</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>PHP script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>tcl</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Tcl script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>rb</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Ruby script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>py</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Python script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>pl</string> | |
+ <string>pm</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Perl script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>sh</string> | |
+ <string>csh</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Shell script</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>h</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>C Header Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>c</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>C Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>hh</string> | |
+ <string>hp</string> | |
+ <string>hpp</string> | |
+ <string>hxx</string> | |
+ <string>h++</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>C++ Header Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>cc</string> | |
+ <string>cp</string> | |
+ <string>cpp</string> | |
+ <string>cxx</string> | |
+ <string>c++</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>C++ Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>m</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Objective-C Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>s</string> | |
+ <string>asm</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Assembly Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>java</string> | |
+ <string>jav</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Java Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>f</string> | |
+ <string>for</string> | |
+ <string>f77</string> | |
+ <string>f90</string> | |
+ <string>f95</string> | |
+ <string>f99</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Fortran Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>pas</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Pascal Source file</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>ada</string> | |
+ <string>adb</string> | |
+ <string>ads</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Ada Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>el</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Emacs Lisp Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>hs</string> | |
+ <string>lhs</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Haskell Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>lua</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Lua Source File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>pro</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>IDL Procedure File</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>gp</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>gnuplot file</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>bib</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>BibTeX document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>tex</string> | |
+ <string>ltx</string> | |
+ <string>ctx</string> | |
+ <string>dtx</string> | |
+ <string>sty</string> | |
+ <string>latex</string> | |
+ <string>texi</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>TeX document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>org</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>Org document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
+ <dict> | |
+ <key>CFBundleTypeExtensions</key> | |
+ <array> | |
+ <string>json</string> | |
+ </array> | |
+ <key>CFBundleTypeIconFile</key> | |
+ <string>document.icns</string> | |
+ <key>CFBundleTypeName</key> | |
+ <string>JSON document</string> | |
+ <key>CFBundleTypeRole</key> | |
+ <string>Editor</string> | |
+ </dict> | |
<dict> | |
<key>CFBundleTypeExtensions</key> | |
<array> | |
@@ -41,6 +504,67 @@ along with GNU Emacs Mac port. If not, see <http://www.gnu.org/licenses/>. | |
<key>CFBundleTypeRole</key> | |
<string>Viewer</string> | |
</dict> | |
+ </array> | |
+ <!-- Export definitions so that macOS understands about the file types --> | |
+ <key>UTExportedTypeDeclarations</key> | |
+ <array> | |
+ <dict> | |
+ <key>UTTypeConformsTo</key> | |
+ <array> | |
+ <string>public.source-code</string> | |
+ </array> | |
+ <key>UTTypeDescription</key> | |
+ <string>Emacs Lisp Source File</string> | |
+ <key>UTTypeIdentifier</key> | |
+ <string>org.gnu.emacs-lisp</string> | |
+ <key>UTTypeReferenceURL</key> | |
+ <string>https://www.gnu.org/software/emacs/manual/html_node/elisp/</string> | |
+ <key>UTTypeTagSpecification</key> | |
+ <dict> | |
+ <key>public.filename-extension</key> | |
+ <array> | |
+ <string>el</string> | |
+ </array> | |
+ </dict> | |
+ </dict> | |
+ <dict> | |
+ <key>UTTypeConformsTo</key> | |
+ <array> | |
+ <string>public.content</string> | |
+ </array> | |
+ <key>UTTypeDescription</key> | |
+ <string>Emacs Lisp Object File</string> | |
+ <key>UTTypeIdentifier</key> | |
+ <string>org.gnu.emacs-lisp-object</string> | |
+ <key>UTTypeReferenceURL</key> | |
+ <string>https://www.gnu.org/software/emacs/manual/html_node/elisp/</string> | |
+ <key>UTTypeTagSpecification</key> | |
+ <dict> | |
+ <key>public.filename-extension</key> | |
+ <array> | |
+ <string>elc</string> | |
+ </array> | |
+ </dict> | |
+ </dict> | |
+ <dict> | |
+ <key>UTTypeConformsTo</key> | |
+ <array> | |
+ <string>public.plain-text</string> | |
+ </array> | |
+ <key>UTTypeDescription</key> | |
+ <string>Org document</string> | |
+ <key>UTTypeIdentifier</key> | |
+ <string>org.orgmode.org</string> | |
+ <key>UTTypeReferenceURL</key> | |
+ <string>http://orgmode.org</string> | |
+ <key>UTTypeTagSpecification</key> | |
+ <dict> | |
+ <key>public.filename-extension</key> | |
+ <array> | |
+ <string>org</string> | |
+ </array> | |
+ </dict> | |
+ </dict> | |
</array> | |
<key>CFBundleExecutable</key> | |
<string>Emacs</string> |
By the way I made a script several years ago that creates an icon for the file type.
https://github.com/emacsfodder/emacs-icons-project/blob/master/document-icons/make-svg-icons.rb
https://github.com/emacsfodder/emacs-icons-project/blob/master/document-icons/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
List of all filetypes applied by this plist.
I noticed that
.md
and.yaml
are missing, it would be handy to keep a list of these and then just generate the plist patch via script.