change location of config files to .config/ani-cli

fix small bugs
This commit is contained in:
ksyasuda
2021-11-01 03:16:38 -07:00
parent 9e4722da4e
commit 4250ab4fd3
5 changed files with 29 additions and 18 deletions

View File

@@ -1,13 +1,15 @@
#!/usr/bin/env bash
CMD=/usr/bin/ani-cli
DEFAULT="$HOME/Videos/sauce/"
CFG_DIR="$XDG_CONFIG_HOME/ani-cli"
# 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:")
-config "$CFG_DIR/meh.rasi" -l 4 -i -p "Enter choice:")
[ "$choice" == "4. Quit" ] && (
echo 'Quitting...'
@@ -20,10 +22,10 @@ if [[ "$selection" == "1." ]]; then
echo "STREAMING..."
$CMD
elif [[ "$selection" == "2." ]]; then
dl_dir=$(rofi -dmenu -config ~/.ani-cli/meh.rasi \
dl_dir=$(rofi -dmenu -config "$CFG_DIR/meh.rasi" \
-l 1 -p "Enter downlaod dir:")
# if dl_dir is none set to current directory
[ "$dl_dir" == "" ] && dl_dir="$HOME/Videos/sauce/"
[ "$dl_dir" == "" ] && dl_dir="$DEFAULT"
$CMD -d "$dl_dir"
elif [[ "$selection" == "3." ]]; then
$CMD -H