14 lines
373 B
Bash
14 lines
373 B
Bash
#!/bin/sh
|
|
|
|
pidof -x playerctlup >/dev/null 2>&1 || playerctlup >/dev/null 2>&1 &
|
|
|
|
PLAYER_EVENT=$(playerctl status)
|
|
|
|
if [ "$PLAYER_EVENT" = "Playing" ] || [ "$PLAYER_EVENT" = "change" ];
|
|
then
|
|
trackName=$(playerctl metadata title)
|
|
artistAndAlbumName=$(playerctl metadata --format "{{ artist }} ({{ album }})")
|
|
|
|
notify-send -u low "$trackName" "$artistAndAlbumName "
|
|
fi
|