Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-07-04 17:50:35

JayGursky
Member
Registered: 2023-07-04
Posts: 21

Drag-drop a plain text string onto Launcher icon?

I want to start some script by dragging a (text/plain) string on its launcher icon.

It seems that this functionality was implemented:

https://bugzilla.xfce.org/show_bug.cgi?id=3958#c4

Use cases:
* A user goes to a website (maybe a forum) where another user/the site owner has written an uri to anoter site, but as non-clickable text. The user wants to open it in a new window/tab, selects the uri text, and drag it to their web browser panel launcher. (Right now, in svn, one can't even drag clickable links from gecko browsers to a panel launcher).
* A program accepts all sorts of text (non-uri) as argument, and can do something with it (e.g. put it in the clipboard, or send a mail with the dragged text as content), and the user wants to use this feature in a panel launcher.

But it doesn't work now.

Probably they decided to comply to freedesktop's specs that forbid plain text for exec keys:

https://specifications.freedesktop.org/ … 01s07.html

Am I right, or I actually can drop strings on launchers?

The alternatives I can think of:

* modifying/writing some plugin like Verve, that accepts dropping strings
* using Autokey hotkeys (which could be not quite so convenient when we have lots of assigned hotkeys).

Offline

#2 2023-07-04 19:37:27

Tamaranch
Member
Registered: 2020-12-31
Posts: 321

Re: Drag-drop a plain text string onto Launcher icon?

It works, on the Mousepad launcher (created via dnd from the app menu) I can dnd a selection whose content is a uri or a path.
You just need to use a field code like %f, %F, %u, or %U in the value of the exec key, and your script must handle this input parameter correctly, of course.

Offline

#3 2023-07-04 19:55:42

JayGursky
Member
Registered: 2023-07-04
Posts: 21

Re: Drag-drop a plain text string onto Launcher icon?

Tamaranch wrote:

It works, on the Mousepad launcher (created via dnd from the app menu) I can dnd a selection whose content is a uri or a path.
You just need to use a field code like %f, %F, %u, or %U in the value of the exec key, and your script must handle this input parameter correctly, of course.

OK. Sorry, I didn't say clearly what I wanted.

A selection whose content is NOT a uri or a path.

Like someone quoted in the OP said:

A program accepts all sorts of text (non-uri) as argument, and can do something with it (e.g. put it in the clipboard, or send a mail with the dragged text as content), and the user wants to use this feature in a panel launcher.

That doesn't work.
And I'm interested in such functionality.
Even though Autokey hotkey can do a similar thing.

Offline

#4 2023-07-04 21:00:26

Tamaranch
Member
Registered: 2020-12-31
Posts: 321

Re: Drag-drop a plain text string onto Launcher icon?

Hmm ok, so I think it's not possible.
As you said the spec does not allow it, so it's not implemented.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 527.78 KiB (Peak: 529.8 KiB) ]