From 9ff2e5011f709a40cc62d0b63c09dda6c46799dc Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Sat, 30 Oct 2021 16:30:40 -0700 Subject: [PATCH] add aniwrapper script --- aniwrapper | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 aniwrapper diff --git a/aniwrapper b/aniwrapper new file mode 100755 index 0000000..f81ed53 --- /dev/null +++ b/aniwrapper @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# not a wrapper around the ani-cli-rofi + +options="1. Stream|2. Download|3. Continue|4. Quit|" + +choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' \ + -config ~/.ani-cli/meh.rasi -l 4 -i -p "Enter choice:") + +[ "$choice" == "4. Quit" ] && ( + echo 'Quitting...' + exit 0 +) + +selection=$(printf "%s\n" "$choice" | awk '{ print $1 }') + +if [[ "$selection" == "1." ]]; then + echo "STREAMING..." + ani-cli +elif [[ "$selection" == "2." ]]; then + dl_dir=$(rofi -dmenu -config ~/.ani-cli/meh.rasi \ + -l 1 -p "Enter downlaod dir:") + # if dl_dir is none set to current directory + [ "$dl_dir" == "" ] && dl_dir="$HOME/Videos/sauce/" + ani-cli -d "$dl_dir" +elif [[ "$selection" == "3." ]]; then + ani-cli -H +fi