mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01: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" ''
|
on_song_change_hook = toString (pkgs.writers.writeDash "songinfo" ''
|
||||||
PATH=$PATH:${lib.makeBinPath [pkgs.playerctl pkgs.gawk pkgs.libnotify]}
|
PATH=$PATH:${lib.makeBinPath [pkgs.playerctl pkgs.gawk pkgs.libnotify]}
|
||||||
metadata=$(playerctl metadata --player spotifyd)
|
metadata=$(playerctl metadata --player spotifyd)
|
||||||
title=$(echo "$metadata" | awk '/xesam:title\s/ { print substr($0, index($0, $3)) }')
|
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 "/")
|
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)) }')
|
album=$(echo "$metadata" | awk '/^xesam:album\s/ { print substr($0, index($0, $3)) }')
|
||||||
notify-send --app-name=" Spotify" "$title" "$album — $artist"
|
notify-send --app-name=" Spotify" "$title" "$artist – $album"
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user