Hey all,
I'm trying to setup a hotkey in KDE that will popup a notification with the current playlist I have running in an xmms2 server.
I currently have some hotkeys such as the following actions, which work fine:
Code:
xmms2 prev; notify-send "Currently Playing" "`xmms2 current`"
xmms2 next; notify-send "Currently Playing" "`xmms2 current`"
That works fine. However, if I want to popup the current playlist, I would want to do something like the following:
Code:
notify-send "Current Playlist" "`xmms2 list`"
But the playlist has newline characters, which apparently notify-send doesn't like...so I've been looking for a way to clear out the newline characters - and ideally replace them with something notify-send can display as newlines (e.g., HTML with <br> tags?).
I've tried using sed to do this, but I don't know enough about it. From what I can tell, the following has no effect on the output (nor do any variations I have tried thus far):
Code:
xmms2 list | sed '{s/\n/<br>/g}'
I've searched around online, but there are far too many examples of what I don't want to do that are drowning out what I do want to do. I'm pretty sure I've even asked something very similar myself, but can't find where that was.
Anyone have any recommendations?