update play-pause script

This commit is contained in:
2026-06-27 19:38:25 +02:00
parent 22296aa139
commit 223c3758bf
2 changed files with 3 additions and 11 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
PLAYLIST_DIR="/home/user/Music/Playlists/" PLAYLIST_DIR="/home/user/Music/Playlists/"
BASENAME="/home/user/Music/$SELECTED_SONGS" BASENAME="/home/user/Music/$SELECTED_SONGS"
echo $BASENAME | kitty +kitten clipboard # echo $BASENAME | kitty +kitten clipboard
if grep -q "$BASENAME" $PLAYLIST_DIR/*.m3u shopt -s extglob
if grep -q "$BASENAME" "$PLAYLIST_DIR"/!(new).m3u
then then
notify-send "Song is in a playlist"; notify-send "Song is in a playlist";
else else
-9
View File
@@ -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