aboutsummaryrefslogtreecommitdiff
path: root/scripts/.local/bin/personal/wrapper/xdg-open
blob: 372bbca862da7b58b5cd9fcf863d872e9a556156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# A wrapper for xdg-open to catch certain cases not caught by mimeapps.list

case "${1%%:*}" in
  http|https|*.html)
    exec qutebrowser "$1"
    ;;
  *.FCStd)
    exec freecad "$1"
    ;;
  *.pdf)
    exec zathura "$1"
    ;;
  mailto)
    exec st -e bash -i -c "mail $1"
    ;;
  *)
    exec /usr/bin/xdg-open "$@"
    ;;
esac