diff options
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 |