add scripts

This commit is contained in:
2025-05-03 23:07:18 -07:00
parent 5cff20c839
commit 773f468b37
20 changed files with 1081 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/sh
PLAYER="$1"
if [ -z "$PLAYER" ]; then
echo "Usage: $0 <player>"
exit 1
fi
STATUS="$(playerctl -p "$PLAYER" status)"
if [ -z "$STATUS" ] || [ "$STATUS" = "Stopped" ]; then
exit 0
elif [ "$STATUS" = "Paused" ]; then
STATUS=" "
elif [ "$STATUS" = "Playing" ]; then
STATUS=" "
else
exit 0
fi
TITLE="$(playerctl -p "$PLAYER" metadata title)"
ARTIST="$(playerctl -p "$PLAYER" metadata artist)"
printf "%s\n" "$STATUS$TITLE - $ARTIST"