blob: 32f552595a220f3bce864592af5031bf3686dbfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
if [ "$MENUCMD" = "tofi" ]
then
menucmd="tofi --width 30% --height 20% --padding-left 2% --matching-algorithm normal"
elif [ "$MENUCMD" = "dmenu" ]
then
menucmd="dmenu -l 10 -g 1 -x -i"
else
menucmd="fzf"
fi
# requirements
which $MENUCMD firefox > /dev/null ||
exit 1
choice="$(find ${1:-$HOME/docs/school} |
grep "Cursus/index.html" 2> /dev/null |
sed "s;$HOME;~;" |
$menucmd)"
test -z "$choice" && exit 1
firefox "$choice"
|