aboutsummaryrefslogtreecommitdiff
path: root/scripts/init-mime.sh
blob: 8146025d3c6bc71a643f58323bafdc57b062b4d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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
set_xdg_mime org.qutebrowser.qutebrowser.desktop x-scheme-handler/http
set_xdg_mime org.qutebrowser.qutebrowser.desktop x-scheme-handler/https
set_xdg_mime feh.desktop image/png