aboutsummaryrefslogtreecommitdiff
path: root/bin/oeffnen
blob: fa11bf64ea20ddf637536e97ba4287e0ad3f7a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

_youtube() {
  grep '\(http[s]*://\)*\(www.\)*\(youtube\.com/watch\|youtu\.be\)*' || return 0
  echo "$1"
}

_feh() {
  grep '\.\(jpg\)*\(png\)*' || return 0
  echo "test $1"
  feh "$1"
}

_yt_REGEXP=""
_feh_REGEXP=".(jpg|jpeg|png|tiff)$"
_feh_CMD="feh %s"
cmds="youtube feh"

arg="$1"

for n in ${cmds}; do
  echo "$arg" | "_$n" && break
  echo "check next"
done