Linux Format

Clipboard 2.0

Nick Peers dons his best hiking gear and goes hunting for a simple clipboard tool to rule them all. CopyQ is happy to oblige.

- Nick Peers dreads to think how many items he’s copied and pasted to clipboards over the past 30-plus years. It’s enough to turn his hair white (from its current grey).

Nick Peers dons his best hiking gear and goes hunting for a simple single clipboard tool to rule them all. Lo and behold, CopyQ is happy to oblige.

The clipboard is one notable part of any operating system that keeps missing out on some love and attention. This brilliant timesaving tool has one fundamenta­l flaw: it can only remember the last item you copied to it.

Thankfully, there’s a cottage industry of clipboard enhancemen­t tools, and one of our favourites has to be CopyQ. It enables you to store multiple clipboard entries comprising plain text, rich text, HTML snippets and images, organised as you see fit into tabs, and editable via its own built-in editor. These clips can then easily be pasted into any compatible document as you see fit.

As always, you’ll find CopyQ available from the Ubuntu Software Centre, but it’s a frozen version (3.10.0 in Ubuntu 20.04 for example). Instead, ensure you have the latest version – 4.1.0 at time of writing – by installing it via flatpak or its own dedicated repo:

$ sudo add-apt-repository ppa:hluk/copyq

$ sudo apt update && sudo apt install copyq

Basic usage

Once installed, open CopyQ from the launcher. It’ll place itself in the menu bar and the main window will appear, only to vanish as soon as you click away from it. Bring it back again by clicking the menu bar icon to reveal the main CopyQ menu, then choosing ‘Show/Hide’ option. Better still, prevent it disappeari­ng so quickly by opening Preference­s from the same menu, then unticking ‘Close when unfocused’. While you’re here, you can configure other key settings, such as whether to have CopyQ automatica­lly start with your PC.

Once done you can leave CopyQ residing silently in the menu bar. The next time you copy any supported item to the clipboard, such as a snippet of text or an image, CopyQ will capture a copy. Verify this by opening the CopyQ menu – you’ll see the item is listed twice: as the current Clipboard item, and additional­ly as an entry in a menu that sits above it, indicating it’s now a part of the CopyQ library.

Note: images copied from your image editor can take a little while to transfer across, so wait a few seconds before checking CopyQ has successful­ly captured them. They’ll appear in the list labelled with only a tiny thumbnail to distinguis­h them from each other. You’ll be able to change this – more on that later.

Now copy a second item and when you next open the menu you’ll see the Clipboard content change to show the item you’ve just copied to it. You’ll also see the new item appear at the top of the list of library items, with your previous item now sitting beneath it.

Pasting items is simple: to use the current clipboard’s contents as you’ve always done, simply press Ctrl+V. However, if you’d rather paste a previously captured clip, just click it from this list and it’ll be pasted into your document at the current cursor point without disrupting the clipboard’s current content.

Organise your clips

As it stands, CopyQ just made copying and pasting multiple clips a whole lot easier, but it’s just the start. As your collection of clips grows, things can become unwieldy, but CopyQ offers several ways in which you can label, edit and organise them. Let’s start by labelling individual clips: click the CopyQ menu icon and choose ‘Show/Hide’.

The main CopyQ window reopens, and this time you’ll see each clip that’s been captured by CopyQ while it’s been running is listed here. First, you can reorganise the order of clips simply by dragging and dropping or using keyboard shortcuts (Ctrl+up arrow/down arrow to move up and down one place, or Ctrl+Home/End to move to the beginning/end of the list, respective­ly).

You can also file clips into separate tabs to organise them – choose Tab>New Tab to get started. You’ll be prompted to name your tab – give it a logical name, and note that you can assign it a keyboard shortcut that will enable you to switch to that tab quickly within the main

CopyQ window using the & operator. For example, ‘Te&xt’ would assign Alt+x to the Text tab.

Once created, the main CopyQ window becomes a multi-tabbed one. Right-click a tab to rename or remove it, and assign it an icon to make it stand out visually. There are two things to consider: first, the main CopyQ menu only displays clips from a single tab at any time – by default this is the currently selected one, but you can specify a specific tab to use via Preference­s>Tray (where you can also change the number of clips shown – five by default).

By default, new clips are automatica­lly stored in the clipboard tab, but you can change this too – via Preference­s>History>Tab for storing clipboard. If you’d like to move clips to a new tab, just locate the clip and drag it on to your target tab. It’ll be copied here rather than moved, so once you’ve verified it’s been copied, simply select the original and press Delete to remove it.

Edit clips

As things stand, clips can only be identified by their content – which is fine in the main window, but can be tricky from the CopyQ menu. To add a title, right-click its entry and choose Edit Notes. Simply enter a title and press the Save button. Adding a title is particular­ly helpful as far as images are concerned, because it displays a descriptiv­e title next to the cryptic tag in the CopyQ menu.

You can also assign tags to clips – right-click the clip and you’ll see options for adding, removing and clearing tags (to add multiple tags in one go, separate them using commas). Tags will then appear above the title. Aside from quick visual clues, they can also be used to filter the tags shown: choose Edit>Find to bring up the search box, then enter a tag to apply the filter. The search box can also be used to search for keywords within clips (these are highlighte­d in the search results).

You can also edit text clips – for example, to correct mistakes or update the text – by right-clicking the text and choosing Edit. You’ll see the same editor used for titles appear, but this time you can use the style options to format your text if you wish. If the built-in editor is too basic for your needs, open CopyQ’s preference­s to the History section and input your choice of editor into the ‘External editor command’ box.

You can link CopyQ to an external image editor too, enabling you to edit image clips simply by right-clicking them and choosing Edit – set this up under ‘Items > Images’ (note to GIMP users – CopyQ behaves much better with the beta version 2.99 – install it via flatpak and then enter the following into the ‘Image editor command’ box: flatpak run org.gimp.GIMP

Pasting items

You’ve built a clip library, organised it into tabs, but you’d like to make it easier to access your clips. One option is to create a keyboard shortcut that enables you to bring up the CopyQ menu bar at the current cursor point in your chosen applicatio­n.

To do this, open CopyQ’s preference­s from its menu bar icon to the Shortcuts>Global tab section. Click + next to ‘Show the tray menu’ to create the shortcut. Choose something unique that won’t clash with another applicatio­n, such as Ctrl+Alt+Super+C, and click OK.

Now switch to your text editor and press the keyboard combo – you’ll see the menu bar menu pops up at the cursor point from which you can select your item to paste in. This works fine when your clips are all handily stored under a single tab; if not, set the keyboard shortcut under ‘Show main window under mouse cursor’ instead to pop up the main CopyQ window at your cursor point instead. Note that any commands you set up in this way will also be added to the main CopyQ menu. To remove them from the menu without losing the keyboard shortcut, check out the Advanced tips and tricks box (below).

 ??  ?? CopyQ sits unobtrusiv­ely into your menu bar, ready to leap into action with its time-saving capabiliti­es when you need to invoke it.
CopyQ sits unobtrusiv­ely into your menu bar, ready to leap into action with its time-saving capabiliti­es when you need to invoke it.
 ??  ??
 ??  ?? As your clip collection grows, make use of CopyQ’s organisati­onal tools. Tabs are particular­ly useful in bringing order to your items.
As your clip collection grows, make use of CopyQ’s organisati­onal tools. Tabs are particular­ly useful in bringing order to your items.

Newspapers in English

Newspapers from Australia