diff --git a/.assets/icons/MYsan.png b/.assets/icons/MYsan.png new file mode 100644 index 0000000..b2ba14d Binary files /dev/null and b/.assets/icons/MYsan.png differ diff --git a/ani-cli b/ani-cli index 3772c05..84e1cd0 100755 --- a/ani-cli +++ b/ani-cli @@ -11,7 +11,8 @@ VERBOSE=0 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/aniwrapper.png" +ANIWRAPPER_ICON_PATH="$CFG_DIR/icons/icon-64.png" +MAISAN_ICON_PATH="$CFG_DIR/icons/MYsan.png" HISTORY_DB="$XDG_CONFIG_HOME/aniwrapper/history.sqlite3" @@ -494,7 +495,7 @@ open_episode() { # ffmpeg -i "$play_link" -c copy "${anime_id}-${episode}.mkv" >/dev/null 2>&1 && ffmpeg -i "$play_link" -c copy "${episode}.mkv" >/dev/null 2>&1 && notify-send -i "$ANIWRAPPER_ICON_PATH" "Download complete for ${anime_id//-/ } - Episode: $episode" || - notify-send -i "$ANIWRAPPER_ICON_PATH" "Download failed for ${anime_id//-/ } - Episode: $episode. Please retry or check your internet connection" + notify-send -i "$MAISAN_ICON_PATH" "Download failed for ${anime_id//-/ } - Episode: $episode. Please retry or check your internet connection" # printf "${c_green}Downloaded episode: %s${c_reset}\n" "$episode" || # printf "${c_red}Download failed episode: %s , please retry or check your internet connection${c_reset}\n" "$episode" } diff --git a/setup.sh b/setup.sh index 34b5fd1..719fc9a 100755 --- a/setup.sh +++ b/setup.sh @@ -46,14 +46,15 @@ run_setup() { log "History database created..." fi - # Move theme files and skip-intro script to correct locations - log "Moving theme files..." - cp themes/* "$DIR"/ - log "Theme files moved..." + if [[ ! -f "$DIR/meh.rasi" ]]; then + # Move theme files and skip-intro script to correct locations + log "Moving theme files..." + cp themes/* "$DIR"/ + log "Theme files moved..." + fi log "Creating mpv/scripts/ directory if it doesn't exist..." mkdir -p "$MPV_DIR/scripts/" - log "Created mpv scripts directory..." if [[ ! -f "$MPV_DIR/scripts/skip-intro.lua" ]]; then log "Moving skip-intro.lua into mpv scripts directory..." cp lua/skip-intro.lua "$MPV_DIR/scripts/" @@ -62,19 +63,19 @@ run_setup() { log "skip-intro.lua already exists in $XDG_CONFIG_HOME/mpv/scripts/" fi - # install aniwrapper icon - # xdg-icon-resource install --size 64 ./assets/icons/icon-64.png aniwrapper --novendor - cp .assets/icons/icon-64.png "$XDG_CONFIG_HOME/aniwrapper/icon-64.png" + if [[ ! -d "$DIR/icons" ]]; then + log "Creating icons directory" + mkdir -p "$DIR/icons" + fi + # install aniwrapper icons + cp .assets/icons/* "$DIR/icons/" + log "Installed icons in config directory..." + # xdg-icon-resource install --size 64 ./assets/icons/icon-64.png aniwrapper --novendor } -if [[ ! -d "$DIR" ]]; then - if run_setup; then - log "Setup Complete...." - else - printf "%s\n" "There was an error during setup" - exit 1 - fi +if run_setup; then + log "Setup Complete...." else - log "Directory exists... skipping setup" - exit 0 + printf "%s\n" "There was an error during setup" + exit 1 fi