I know firefox has the very useful “Copy clean Link” option in the context menu, but I would like a similar feature for copying links from any other software, like spotify for example. So I am looking for some software that hooks into the clipboard pipeline, and cleans any URL that gets added. I tried googling for something like it, but was completely unsuccessful. Does anyone have a clue how I might go about achieving this?
Thanks in advance :)
Edit: I found out about klipper
’s actions, which provide the option to run a command when a string that matches a regex is added to the clipboard buffer. I am not sure how to properly use this though, so any help is appreciated!
Looks like https://old.reddit.com/r/kde/comments/d3m0fz/how_to_open_links_in_mpv_with_klipper/ is a good starting point, i.e
then… to try! :D I’m just discovering this too but seems like the right way.
That said I’d be cautious and limit the use case to only what you have, e.g. Spotify links, at least at first because I imagine one can get into hairy edge cases quickly.
Keep us posted!