blob: cc13d0a6bcf3a89f9a49377025aba1af3df3f86c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
set -eu
if [ -n "${SSH_CLIENT:-}" ]; then
exec pbd -o "$@"
fi
case "$1" in
(*.gif|*.jpeg|*.jpg|*.png)
curl -LSs "$1" | imv -
;;
(https://youtu.be/*|https://www.youtube.com/watch*|https://twitch.tv/*)
exec mpv "$1" >/dev/null 2>&1
;;
(*)
exec firefox -new-tab "$1" >/dev/null 2>&1
;;
esac
|