aboutsummaryrefslogtreecommitdiff
path: root/modules/rmpc/notify.sh
blob: 7a17bfb15b72143a4b675ef6b487b1fa8d24c2e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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