aboutsummaryrefslogtreecommitdiff
path: root/scripts/open
blob: 97c93bead5d96a558458b27f91ada75ebdc65bd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -eux

case "$1" in
  *.ico|*.jpg|*.jpeg|*.png)
    feh "$1"
    ;;
  https://www.youtube.com/watch*)
    vlc "$1"
    ;;
  http*|*.svg|*.html)
    firefox "$1"
    ;;
  *.pdf)
    zathura "$1"
    ;;
  *.flac|*.ogg|*.mkv)
    vlc "$1"
    ;;
  *)
    /run/current-system/sw/bin/xdg-open "$1"
    ;;
esac