Allow renaming of nodes
Is your feature request related to a problem? Please describe. I'm trying to make a setup where I play different audio to different connected devices. I started using coppwr just a bit ago (so the functionality might exist but I don't know it). I had 2 videos playing sound opened on firefox, so I had two nodes, both labeled as "Firefox", and just looking at the graph, I couldn't tell one from the other.
Describe the solution you'd like With a right click, or maybe a little pen icon, allow the renaming of a node in the GUI.
Describe alternatives you've considered
Since I noticed in the details that there was media.name, maybe a little checkbox to rename the node to the name of the media it is playing instead ? But that would only apply to audio sources, so I think the manual renaming is better at first, because it can be applied to everything.
Additional context
Screenshot to show what I'm doing:
Very cool project btw ! I took a quick look at the code earlier, I wouldn't mind implementing this if I'm told where to look at (I'm guessing the code for both adding an edit icon on a node, as well as where each node is named would be where to start)
Another more general solution could be to let users specify their preferred order of properties to show in that place for each object type
You can add the property you want to get the value from here https://github.com/dimtpap/coppwr/blob/39473efba9f0ca7a00090d9fc986c8b5494de54b/src/ui/global.rs#L240 if you want to adjust it to your needs for now
Ah yes, that would work also. Advantage is that it would auto-update the name if the media being played changes, but on the other side, someone might want to rename their node with a symbolic name that has nothing to do with the data of the media.
Taking my example again, I thought about renaming my speakers to the position I plan on putting them in a room (so that's not information that's available inside coppwr).
I feel like having both would be for the best (one auto-updates, and the other lets you choose the name directly)
I did the little change you talked about above.
Also, just a little confusion; when I was talking about renaming, I was talking about changing the "Firefox" at the top left; this also works, but I would prefer renaming the entire node title, as it seems more intuitive
I'll be rewriting the graph code since it's a bit limited for a lot of stuff as it is now. After that it'll be able to handle user-set Global "nicknames".
Nice :+1: !