aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2021-12-10 00:23:27 +0800
committerGuangxiong Lin <[email protected]>2021-12-10 00:23:27 +0800
commitfef9656b9cd2b5b6e1a02fb4f454cde568ba1091 (patch)
tree05f97125792d3177eb915f08b8b292b1a72add03
parent7092f85cc40f133e8ede8796d43006421a428fdc (diff)
downloaddotfiles-fef9656b9cd2b5b6e1a02fb4f454cde568ba1091.tar.gz
dotfiles-fef9656b9cd2b5b6e1a02fb4f454cde568ba1091.tar.bz2
dotfiles-fef9656b9cd2b5b6e1a02fb4f454cde568ba1091.zip
Set default application mime
-rwxr-xr-xscripts/init-mime.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/init-mime.sh b/scripts/init-mime.sh
new file mode 100755
index 0000000..c58c46f
--- /dev/null
+++ b/scripts/init-mime.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set_xdg_mime () {
+ application=$1
+ mimetype=$2
+
+ if [ -f /usr/share/applications/$application -o -f $HOME/.local/share/applications/$application ]
+ then
+ xdg-mime default $application $mimetype
+ fi
+}
+
+set_xdg_mime org.pwmt.zathura.desktop application/pdf