mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
fix: spotifyd notification format
This commit is contained in:
@@ -26,10 +26,10 @@ in
|
||||
on_song_change_hook = toString (pkgs.writers.writeDash "songinfo" ''
|
||||
PATH=$PATH:${lib.makeBinPath [pkgs.playerctl pkgs.gawk pkgs.libnotify]}
|
||||
metadata=$(playerctl metadata --player spotifyd)
|
||||
title=$(echo "$metadata" | awk '/xesam:title\s/ { print substr($0, index($0, $3)) }')
|
||||
artist=$(echo "$metadata" | awk '/xesam:artist\s/ { print substr($0, index($0, $3)) }' | paste --serial --delimiters "/")
|
||||
album=$(echo "$metadata" | awk '/xesam:album\s/ { print substr($0, index($0, $3)) }')
|
||||
notify-send --app-name=" Spotify" "$title" "$album — $artist"
|
||||
title=$(echo "$metadata" | awk '/^xesam:title\s/ { print substr($0, index($0, $3)) }')
|
||||
artist=$(echo "$metadata" | awk '/^xesam:artist\s/ { print substr($0, index($0, $3)) }' | paste --serial --delimiters "/")
|
||||
album=$(echo "$metadata" | awk '/^xesam:album\s/ { print substr($0, index($0, $3)) }')
|
||||
notify-send --app-name=" Spotify" "$title" "$artist – $album"
|
||||
'');
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user