diff --git a/ani-cli b/ani-cli index 08b295c..5195c5c 100755 --- a/ani-cli +++ b/ani-cli @@ -1,20 +1,13 @@ #!/usr/bin/env bash -# Set config directory if not already set -if [[ -z "$XDG_CONFIG_HOME" ]]; then - XDG_CONFIG_HOME="$HOME/.config" -fi - VERBOSE=0 -# BASE_URL="https://www2.gogoanime.cm/" -BASE_URL=$(curl -s -L -o /dev/null -w "%{url_effective}\n" https://gogoanime.cm) -CFG_DIR="$XDG_CONFIG_HOME/aniwrapper" -ROFI_CFG="meh.rasi" ANIWRAPPER_ICON_PATH="$CFG_DIR/icons/icon-64.png" +BASE_URL=$(curl -s -L -o /dev/null -w "%{url_effective}\n" https://gogoanime.cm) +CFG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/aniwrapper" +HISTORY_DB="${XDG_CONFIG_HOME:-$HOME/.config}/aniwrapper/history.sqlite3" MAISAN_ICON_PATH="$CFG_DIR/icons/MYsan.png" - -HISTORY_DB="$XDG_CONFIG_HOME/aniwrapper/history.sqlite3" +ROFI_CFG="aniwrapper.rasi" # dependencies: grep, sed, curl, video_player, rofi, sqlite3 # video_player ( needs to be able to play urls ) @@ -81,7 +74,6 @@ search_anime() { # if one word, remove leading or trailing whitespace search="${1// /}" fi - # search=${1// /-} log "Search Query: $search" titlepattern='