diff --git a/.local/bin/downloadSpotify b/.local/bin/downloadSpotify index 47f94b25..f046f104 100755 --- a/.local/bin/downloadSpotify +++ b/.local/bin/downloadSpotify @@ -1,7 +1,11 @@ -#!/usr/bin/bash +#!/bin/bash + +notify() { + notify-send "Spotdl Sync" "$1" --icon=spotify --app-name=spotify +} if ! command -v spotdl &>/dev/null; then - notify-send "Spotdl Sync" "Error: spotdl is not installed" --icon=spotify --app-name=spotify + notify "Error: spotdl is not installed" exit 1 fi @@ -14,14 +18,14 @@ FOLDERS=( "Cyberpunk-Darksynth" ) -notify-send "Spotdl Sync" "Started syncing..." --icon=spotify --app-name=spotify +notify "Started syncing..." for FOLDER in "${FOLDERS[@]}"; do cd "$HOME/Musica/Listen-To/$FOLDER" || continue spotdl sync "${FOLDER,,}.sync.spotdl" - notify-send "Spotdl Sync" "$FOLDER synced" + notify "$FOLDER synced" done -notify-send "Spotdl Sync Complete" +notify "Spotdl Sync Complete"