Closed apitanga closed 2 years ago
Using the helper script rtng-dbus you can do something like this:
rtng-dbus get_player_state | jq .title,.artist | xargs notify-send -i radiotray-ng-notification
Thank you, I'll check it out
Ended up going with,
artist_title=$(rtng-dbus get_player_state | jq '.artist,.title | select( . != null )' | tr -d '"' | tr -d
'\\')
station=$(rtng-dbus get_player_state | jq '.station' | tr -d '"' | tr -d '\\')
notify-send -i radiotray-ng-notification "$station" "$artist_title"
I'm trying to figure out a method to wrap a keyboard shortcut around to display (send notification of) the currently playing Station, Artist and Title, not unlike how radiotray-ng already does normally when that information changes, but upon request.
I could not find a dbus method or a CLI flag to just show/notify the currently playing information. Is there a simple way that I may be missing, or is this a fair request for new feature?