Am Tue, 08 Sep 2020 17:41:55 +0100 schrieb Tixy <t...@yxit.co.uk>: > #------------------------------------------------ > ~$ cat Desktop/test.desktop > [Desktop Entry] > Encoding=UTF-8 > Version=1.0 > Type=Application > Terminal=true > Exec=/home/tixy/test.sh %F > Name=Test launcher > Icon=/home/tixy/test.svg > > #------------------------------------------------
Thanks so much Tixy. To my shame I have to admit that I was missing the %F (or %U) in my desktop starter file. Now with '%F' I can drag and drop, the programm accepts the argument, but only one. When I give two arguments (select two files from the desktop, drag and drop them on the starter), xfce will spawn two instances, even though I used capital '%F'. I've asked a question in the xfce forums about this: https://forum.xfce.org/viewtopic.php?pid=60260 > This is what I did to test, including some code to distinguish audio > files from extension. (The 'file' command would probably be best for > testing file type properly, never used this though.) Thanks for your audio/video code, but I *really* want a gui that will handle stuff in a more generic way. Your example inpired me to "auto sort" the arguments if there are multiple that need to be in exact order. That would be a super feature for the really lazy "grab all - drop all" users ;-) Actually I've got the basic idea implemented already (using Python/QT). The GUI lets me select the task from a list (by files in a configuration directory) and load the "command template" from that file. The program will then substitue the placeholders with my drag and drop arguments. For now I can combine/split video files and also upload files to a server using scp and interactivly ask for a password (spawned a terminal running bash). And of course I have a "hello argument" test ;-) There are plenty of ideas how to improve the program. The source code is still quite dirty (it's more a proof of concept at the moment). But I might decided to release it in case some of my friends find it useful ;-) Best regards, Christoph