I am using KDE Plasma 5.12.7 on Kubuntu 18.04 (for details of my system configuration, see below).
I would like a clipboard manager and a file manager that would together allow me to rename files, where I would build a single new filename by combining several items from the clipboard history. I would like to be able to do it within the file manager (while it is in its 'rename' mode) through using global shortcuts that directly paste the individual items from the clipboard history onto the blank filename. (By 'blank filename' I'm referring to what you get when, in a file manager, you right-click a file and select 'rename'. This is inline renaming; in all file managers I tried, it is only for batch renaming of multiple files that a renaming dialog window opens. I rarely batch rename files, so it's the inline process that is relevant here.)
This comes up when I try to rename a downloaded article into something like e.g. 'Smith and Williams A new algorithm for matrix multiplication J Num Math 45 897-903 2004.pdf'. I usually have to copy the last name of each author separately, each line of the title (if it's long) separately, etc., so that all those things become items in the clipboard history.
In other words, I would like the following functionality:
- Copy at least 10 items onto the clipboard history, e.g. item 0 is 'Smith', item 1 is 'Williams', item 2 is 'A new algorithm for matrix multiplication', item 3 is 'J', item 4 is 'Num', item 5 is 'Math', item 6 is '45', etc.
- I should be able to paste these items via global shortcuts. For example, meta+shift+1 pastes 'Smith', meta+shift+2 pastes 'Williams', etc.
- I should be able to use these shortcuts while inline-renaming a filename within the file manager. So e.g. in Dolphin, I would highlight the file I wish to rename, press f2 (which invokes the 'rename' function), delete the old filename, and then rename the file into 'Smith and Williams A new algorithm for matrix multiplication J Num Math 45 897-903 2004.pdf' by pressing meta+shift+1, then typing ' and ', then meta+shift+2, then typing ' ' (i.e. just ordinary space), then meta+shift+3, etc.
I should mention that I was able, for a while, to have this functionality in Windows 7, using the standard Explorer file manager and a clipboard manager called Ditto.
Under kubuntu+KDE Plasma, the only clipboard manager that I've been able to find that in principle allows for something like this functionality is CopyQ. I wrote new commands, with appropriate global shortcuts, that look like this:
the first global shortcut, meta+shift+1, executes
the second global shortcut, meta+shift+1, executes
and so on.
This works as expected inside text editors, e.g. Kate.
However, it does not work when I try to rename a file within Dolphin. What happens instead is that when the global shortcut is pressed, Dolphin exits the renaming mode and... actually, it's not clear what it does next. Sometimes it leaves the filename as it was, sometimes it prompts me with 'Filename for clipboard content'. Sometimes it apparently simply deletes the file I was trying to rename (without moving it to trash, which is kind of disturbing).
I tried using two other file managers, Krusader and Konqueror, but they also did not support this functionality in combination with CopyQ. The problem is the same as with Dolphin: when I try to use the global shortcut, they just exit the filename renaming mode and leave the old filename intact.
Another clipboard manager that comes close to what I want is Klipper. One problem with Klipper is that there don't seem to be any global shortcuts that directly access the items in the clipboard history. What I was able to do instead is this: in system settings-> workspace->shortcuts->Global shortcuts->Plasma, I assigned shortcuts to 'Next history item' and 'Previous history item'. I can use those to cycle through the clipboard, and use ctrl+v (or sometimes the middle button) as usual to paste them.
This is not exactly what I want, but I could accept it if it worked for the purposes of file renaming. However, once again, while this sort of cycling through the clipboard history plus ctrl+v works fine within text editors, it does not work within file managers: as soon as a global shortcut is pressed, the file manager exits the renaming functionality.
It is true that I could use these two clipboard managers on the command line (i.e. in Konsole). I can indeed use the cp command and then build the new filename on the command line using the global shortcuts, which do work inside Konsole. But I want to be able to do it within a file manager.
For what it's worth, the same problem appears if I try to paste from e.g. texpander: the moment its global hotkey is pressed, the file manager exits the renaming mode.
Now, if a renaming window opens, then I can normally paste into it from the clipboard managers and texpander. But such a window only opens if I try to batch rename more than one file, which I rarely do.
Does anyone have any ideas about how I might be able to have the functionality I described? Is there no way to use global shortcuts within the inline renaming function of a file manager?
I did a lot of googling, but found nothing.
Here are the versions of the various components of my system:
KDE Plasma Version 5.12.7
KDE Frameworks: 5.44.0
kernel version: 4.18.0-17-generic
machine: Dell Precision M4800 (which is a 64-bit machine)