diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-17 16:28:44 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-17 16:28:44 +0200 |
commit | 9fb919bb1ff1b38ece25973662aa595bec3b7328 (patch) | |
tree | c91238593e11189606c08d520e46d31ed1b6cd55 /bin/guiscripts/mcurs | |
parent | a1f61ef7764a543a894bf58b0db14f677323fcbe (diff) |
renamed dm scripts to m scripts
Diffstat (limited to 'bin/guiscripts/mcurs')
-rwxr-xr-x | bin/guiscripts/mcurs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/guiscripts/mcurs b/bin/guiscripts/mcurs new file mode 100755 index 0000000..089bce4 --- /dev/null +++ b/bin/guiscripts/mcurs @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ "$MENUCMD" = "tofi" ] +then + menucmd="tofi --width 30% --height 20% --padding-left 2%" +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" |