I'm trying to create a .contract
file for pantheon-files
that will produce a shareable link for a file/folder within my Dropbox.
So far, I have this:
[Contractor Entry]
Name=Share Dropbox link
Description=Obtain the url for sharing the file/folder with Dropbox
MimeType=application
Exec=dropbox sharelink %F | xclip -sel clip
but it does not work.
The command dropbox sharelink %F | xclip -sel clip
works properly when used in terminal (replacing %F
with the name of a file or folder). It will generate the share link, and copy it to the clipboard.
What am I missing and/or doing wrong?
Also, is it possible to add perhaps a system message showing "The link was generated and copied to clipboard" if the command is successful, and some kind of "Error" if it is not?
There is not much info on .contract
files that I know of.
zenity
dialog, from where I can copy the link myself. The plugin from Gabriel's answer worked for a while, but stopped working months ago. I even tried to report it to its dev (Cody Garver, co-founder of elementary), but I couldn't find the repo. I think an answer that actually helps with the contractor would be much more useful, even for other purposes.MimeType=!inode
, I copied it from the send-via-bluetooth contractor (I think). Do you have a reason for usingapplication
instead? And my exec isExec=dropbox sharelink %f | zenity --text-info
, which also works fine in terminal but fails in a contractor file :/