diff options
author | Guangxiong Lin <[email protected]> | 2021-12-10 00:23:27 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2021-12-10 00:23:27 +0800 |
commit | fef9656b9cd2b5b6e1a02fb4f454cde568ba1091 (patch) | |
tree | 05f97125792d3177eb915f08b8b292b1a72add03 /scripts/init-mime.sh | |
parent | 7092f85cc40f133e8ede8796d43006421a428fdc (diff) | |
download | dotfiles-fef9656b9cd2b5b6e1a02fb4f454cde568ba1091.tar.gz dotfiles-fef9656b9cd2b5b6e1a02fb4f454cde568ba1091.tar.bz2 dotfiles-fef9656b9cd2b5b6e1a02fb4f454cde568ba1091.zip |
Set default application mime
Diffstat (limited to 'scripts/init-mime.sh')
-rwxr-xr-x | scripts/init-mime.sh | 13 |
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 |