bassmanitram / actions-for-nautilus

An extension to the Gnome "Files" file manager that allows you to add arbitrary actions to the file selection context menu.
Apache License 2.0
165 stars 16 forks source link

add xclip to placeholders #36

Closed supermerill closed 1 year ago

supermerill commented 1 year ago

Hi I didn't know how to create a command line that have the content of the clipboard inside an argument, so I added the xclip command to available placeholders.

bassmanitram commented 1 year ago

Oh, I like THAT idea!!!

I'll test it!

bassmanitram commented 1 year ago

Hey - Python and GTK actually have built-in clipboard access/management. https://python-gtk-3-tutorial.readthedocs.io/en/latest/clipboard.html

Maybe have a look at that rather than use xclip (e.g. line 40 of the example on that page)?

supermerill commented 1 year ago

I used xclip because it's a Suggested Additional Packages and it doesn't involve any python dependencies. I'm not sure what's available in a nautilus plugin natively.

bassmanitram commented 1 year ago

I used xclip because it's a Suggested Additional Packages and it doesn't involve any python dependencies. I'm not sure what's available in a nautilus plugin natively.

Yeah understood - I'm gonna mess a bit with the implementation to see if I can get the integrated clipboard stuff to do the same thing - that might make the implementation a bit cleaner and more performant but I'll keep the same semantics you have.

I've changed the target branch to one I've just created ... feature/clipboard-place-holder.