12

I am looking for a clipboard manager, but I don't want one that just keeps a list so I can select an item to bring it to the front of the clipboard, nah, that's too easy.

What I am looking for is a clipboard manager where I can assign say
Ctrl+Shift+1 to paste the first item in the clipboard,
Ctrl+Shift+2 to paste the second item in the clipboard
...
Ctrl+Shift+9 to paste the ninth item in the clipboard
Ctrl+Shift+0 to paste the tenth item in the clipboard

why?
As we web developer I am often pasting alternating lines of code (remember, not all browsers support CSS3!),

<tr class="odd">...</tr>  
<tr class="even">...</tr>
<tr class="odd">...</tr>  
<tr class="even">...</tr>

So, the ability to just sit there doing
Ctrl+Shift+1 Enter

Ctrl+Shift+2 Enter

Would be a huge help,

I am using 12.10 with gnome-shell 3.6.2.

I have looked into gPaste and such, but none seem to have this feature.

5
  • You didn't say which text editor you're using. This can potentially be handled by the editor itself, i.e. I can tell you how to do this with vim, but if you use a different editor it's not going to be helpful. Or maybe you want this to work system-wide?
    – roadmr
    Feb 11, 2013 at 21:39
  • 1
    also, you looked into "gpaste and such". Can you elaborate on which options you tried? Right off the bat I found glipper, which has "support for Actions", which may do what you want.
    – roadmr
    Feb 11, 2013 at 21:41
  • Why not use a editor with registers like emacs or vim instead? I personally doubt that you will find what you are looking for :(
    – McNisse
    Feb 11, 2013 at 21:46
  • I would prefer system wide, but, as a compromise, PHP Storm is my IDE.
    – Hailwood
    Feb 11, 2013 at 22:24
  • Have you seen askubuntu.com/q/11925/44179 ?
    – Seth
    Feb 12, 2013 at 3:19

4 Answers 4

4

I'm not aware of a clipboard manager that itself provides the feature you want, but there are two ways in which I imagine that Klipper could be incorporated in a solution.

  1. Klipper offers "Next History Item" and "Previous History Item" shortcuts that change the order of the clipboard history. Therefore, pasting the nth entry can be done by running the "Next History Item" shortcut n times, then running Ctrl+V (or whatever your paste shortcut is), and then -- to put the history back into its original order -- running the "Previous History Item" shortcut n times. Using this, your problem reduces to setting a shortcut that simulates entering a series of shortcuts.
  2. The command qdbus org.kde.klipper /klipper getClipboardHistoryItem n where the n at the end is a number (e.g. 0, 1, 2...) will output the nth clipboard history item. Using this, your problem reduces to the problem of setting a keyboard shortcut that will paste the output of a command.
3

GPaste is a clipboard management system for GNOME. GPaste manages clipboard history and allows easy access to it using keyboard shortcuts, gnome-shell extension and command-line tools.

To install GPaste in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install gpaste

Qlipper is a lightweight clipboard history applet. It provides the following features:

  • saves clipboard history entries and restores them
  • lightweight
  • system tray docking app
  • few requirements
  • can be used in GNOME

To install Qlipper in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install qlipper

CopyQ is an advanced clipboard manager with editing and scripting features. CopyQ monitors the system clipboard and saves its content in customized tabs. Saved clipboard entries can be later copied and pasted directly into any application.

To install CopyQ in Ubuntu 18.04 and later open the terminal and type:

sudo apt install copyq
1
  • Qlipper sounds good and would be lightweight but it doesn't seem to work with MATE desktop for some reason. Tested on Ubuntu 20.04 LTS. I ended up running gpaste-client on session start and adding a custom launcher to run gpaste-client ui whenever I need to access the history. Apr 22, 2023 at 8:58
1

When Keepboard is activated, the second item in the history is selected by default (because the top item is in the clipboard anyway and can be pasted directly without activating clipboard manager). Thus you can quickly paste the second item by using Keepboard activation hotkey and pressing Enter right away.

0

I've released a clipboard manager Gnome extension that supports paste on select, including numbered keyboard shortcuts to select the Nth item.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .