From 5b567c46e9917a9784b41bc43e629fb8e1123d20 Mon Sep 17 00:00:00 2001 From: zloy_linux Date: Tue, 25 Nov 2025 18:35:07 +0700 Subject: [PATCH] Remove --- config/rmpc/increment_play_count | 8 -------- config/rmpc/inspect_log.sh | 26 -------------------------- config/rmpc/notify | 26 -------------------------- 3 files changed, 60 deletions(-) delete mode 100755 config/rmpc/increment_play_count delete mode 100755 config/rmpc/inspect_log.sh delete mode 100755 config/rmpc/notify diff --git a/config/rmpc/increment_play_count b/config/rmpc/increment_play_count deleted file mode 100755 index edd86d1..0000000 --- a/config/rmpc/increment_play_count +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -sticker=$(rmpc sticker get "$FILE" "playCount" | jq -r '.value') -if [ -z "$sticker" ]; then - rmpc sticker set "$FILE" "playCount" "1" -else - rmpc sticker set "$FILE" "playCount" "$((sticker + 1))" -fi diff --git a/config/rmpc/inspect_log.sh b/config/rmpc/inspect_log.sh deleted file mode 100755 index 660eae6..0000000 --- a/config/rmpc/inspect_log.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env sh - -LOGFILE="$HOME/.mpd/log" -OUTFILE="$HOME/.config/rmpc/genre_counts.txt" -TMPFILE="$(mktemp)" - -# Extract and accumulate genres to tmpfile -grep "player: played" "$LOGFILE" | while read -r line; do - filepath=$(echo "$line" | sed -n 's/.*player: played "\(.*\)"/\1/p') - fullpath="$HOME/Music/mpd/$filepath" - - if [ -f "$fullpath" ]; then - genre=$(eyeD3 --no-color "$fullpath" | grep "genre:" | sed -E 's/.*genre: (.*) \(id.*/\1/') - IFS=';' - for g in $genre; do - clean_genre=$(echo "$g" | xargs) - [ -n "$clean_genre" ] && echo "$clean_genre" >> "$TMPFILE" - done - fi -done - -# Count and sort genres -sort "$TMPFILE" | uniq -c | sort -k1 -nr | awk '{ $1=$1; print substr($0, index($0,$2)) " " $1 }' > "$OUTFILE" - -rm "$TMPFILE" -echo "✅ Genre frequency list saved to $OUTFILE" diff --git a/config/rmpc/notify b/config/rmpc/notify deleted file mode 100755 index b6be1e9..0000000 --- a/config/rmpc/notify +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env sh - -# Directory where to store temporary data -TMP_DIR="/tmp/rmpc" - -# Ensure the directory is created -mkdir -p "$TMP_DIR" - -# Where to temporarily store the album art received from rmpc -ALBUM_ART_PATH="$TMP_DIR/notification_cover" - -# Path to fallback album art if no album art is found by rmpc/mpd -# Change this to your needs -DEFAULT_ALBUM_ART_PATH="$TMP_DIR/default_album_art.jpg" - -# Save album art of the currently playing song to a file -if ! rmpc albumart --output "$ALBUM_ART_PATH"; then - # Use default album art if rmpc returns non-zero exit code - ALBUM_ART_PATH="${DEFAULT_ALBUM_ART_PATH}" -fi - -MSG_TITLE=$(urlencode "$TITLE") -MSG_ARTIST=$(urlencode "$ARTIST") - -# Integrates with hammerspoon, but use whatever terminal notifier you have set up. -#open "hammerspoon://canvasNotify?line1=$TITLE&line2=$ARTIST&duration=3"