clipboard script keyboard shortcut question? Show more
Here's me fiddling with the clipboard again..
xsel | sed -e 's/youtube.com/invidio.us/g' | xsel -b
pipe contents of YT URL through sed to change to invidio.us and then back into xsel clipboard..
how do I get this to run (in a terminal?) via a keyboard shortcut (Ctrl+\)?
bash script? attached to a shortcut?
I might be approaching this all wrong..
@spelk Xfce menu --> Settings --> Keyboard --> Application shortcuts
clipboard script Show more
@neoncipher I've tried adding the piped command line into that menu, along with a shortcut to Ctrl+Alt+V & when I copy a YT link to clipboard, I press the key combo & nothing seems to happen.
Do I have to invoke the piped command through a bash script instead? and map that to shortcut?
I tried that also & that didn't seem to do anything.
Do I have to invoke a terminal session with that command in it?
In a terminal that command works ok, attach to shortcut doesn't work.
@spelk piped command is a feature of bash or dash. You can create a script or invoke dash directly in "Application shortcuts":
sh -c 'xsel | sed -e "s/youtube.com/invidio.us/g" | xsel -b'
note the tricky quotation marks 😉
A dark place for a dark future.