From 223c3758bf5172b210a9af4ecf19943f6b5012aa Mon Sep 17 00:00:00 2001 From: KeksNino Date: Sat, 27 Jun 2026 19:38:25 +0200 Subject: [PATCH] update play-pause script --- check-playlist.sh | 5 +++-- spotify-pause | 9 --------- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100755 spotify-pause diff --git a/check-playlist.sh b/check-playlist.sh index a0af8fe..bd99491 100755 --- a/check-playlist.sh +++ b/check-playlist.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash PLAYLIST_DIR="/home/user/Music/Playlists/" BASENAME="/home/user/Music/$SELECTED_SONGS" -echo $BASENAME | kitty +kitten clipboard -if grep -q "$BASENAME" $PLAYLIST_DIR/*.m3u +# echo $BASENAME | kitty +kitten clipboard +shopt -s extglob +if grep -q "$BASENAME" "$PLAYLIST_DIR"/!(new).m3u then notify-send "Song is in a playlist"; else diff --git a/spotify-pause b/spotify-pause deleted file mode 100755 index 58c4847..0000000 --- a/spotify-pause +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -mpd_status=$(playerctl --player=mpd status 2>/dev/null) - -if [ "$mpd_status" == "Playing" ]; then - playerctl --player=mpd pause -else - playerctl --player=mpd play 2>/dev/null || playerctl --player=spotify play -fi