Last active
August 17, 2023 13:50
-
-
Save giner/0eb272c11085036c4438413f6de0e454 to your computer and use it in GitHub Desktop.
Give *.drawio files MIME type to make application association work
This file contains 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
#!/bin/sh | |
# drawio.xml is taken from Draw.io debian package | |
cat > ~/.local/share/mime/packages/drawio.xml << 'EOF' | |
<?xml version="1.0" encoding="utf-8"?> | |
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> | |
<mime-type type="application/vnd.jgraph.mxfile"> | |
<glob pattern="*.drawio"/> | |
<comment>draw.io Diagram</comment> | |
<icon name="x-office-document" /> | |
</mime-type> | |
<mime-type type="application/vnd.visio"> | |
<glob pattern="*.vsdx"/> | |
<comment>VSDX Document</comment> | |
<icon name="x-office-document" /> | |
</mime-type> | |
</mime-info> | |
EOF | |
update-mime-database ~/.local/share/mime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment