From fef9656b9cd2b5b6e1a02fb4f454cde568ba1091 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 10 Dec 2021 00:23:27 +0800 Subject: Set default application mime --- scripts/init-mime.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/init-mime.sh (limited to 'scripts') 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 -- cgit v1.2.3