diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-07-27 14:28:38 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-07-27 14:28:38 -0400 |
| commit | 60b33d6edc6eff5142c2def85a07406ff867b5e5 (patch) | |
| tree | a73b13941e2b1bc2d8f49162c9bb9258a52b03c2 /modules/rmpc/notify.sh | |
| parent | fcb37bdf9e6107f1d34ff05c8558021d67a0aeec (diff) | |
| download | home-60b33d6edc6eff5142c2def85a07406ff867b5e5.tar.gz | |
modules/rmpc: initial config, song change notifications
Diffstat (limited to 'modules/rmpc/notify.sh')
| -rwxr-xr-x | modules/rmpc/notify.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/rmpc/notify.sh b/modules/rmpc/notify.sh new file mode 100755 index 0000000..7a17bfb --- /dev/null +++ b/modules/rmpc/notify.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +TMP_DIR="/tmp/rmpc" + +mkdir -p "$TMP_DIR" + +ALBUM_ART_PATH="$TMP_DIR/notification_cover" + +pkill mako +if ! rmpc albumart --output "$ALBUM_ART_PATH"; then + notify-send "Now Playing" "$ARTIST - $TITLE" +else + notify-send -i "${ALBUM_ART_PATH}" "Now Playing" "$ARTIST - $TITLE" +fi + |