Add files via upload

This commit is contained in:
2025-11-24 19:46:30 +07:00
parent 90cc6d4253
commit a7ab7103a5
365 changed files with 17881 additions and 0 deletions

26
config/rmpc/notify Executable file
View File

@@ -0,0 +1,26 @@
#!/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"