summary refs log tree commit diff
path: root/home/.local/bin/open
blob: a1f57a1a41b4722c947f8a165503fff52ab259e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
set -eu

if [ -n "${SSH_CLIENT:-}" ]; then
	exec pbd -o "$@"
fi

case "$1" in
	(*.gif|*.jpeg|*.jpg|*.png)
		curl -LSs "$1" | imv -
		;;
	(*)
		exec xterm -e w3m "$1"
		;;
esac