KDE service menu to create new folder from selection
Like the title says, I'm trying to create a KDE service menu for the purpose (I think something similar is in OSX 10.8).
I used this tutorial and I've gotten as far as invoking kdialog to get the name of the new directory... and possibly using xargs to pass the output to mkdir.
However, I can't seem to find how to create a folder in the directory the service was called from (it defaults to $HOME).
Two, I'm trying to use the following:
bash -c "(kdialog --inputbox "Folder to be created" "New Folder" --title "Create New Folder with selection" | xargs -0 mkdir)"
in the Exec field of the .desktop file for the service. It errors out with "to: -c: line 1: syntax error: unexpected end of file". My question is how I get "bash -c" to accept multiple inputs with command line switches.
Three, and this is if anyone's experimented with this kinda thing, Dolphin reflects changes made to the .desktop file for the service menu only on the 2nd execution or so. Bug?
KDE 4.10 on Arch x64, if that's relevant.
Posted Feb 11, 2013, 8:09 PM UTC · edited
Figured it out:
The Service menu folder needs a desktop file in it. How to make one is in the tutorial above.
In my case, this was:
And as for the actual script,
Someone tell me I'm pretty.
You're awesome. And pretty. Very pretty. :)
Also, I'm stealing this for r/kde.
Add it to the AUR!!!