FAQ - Frequently Asked Questions
How to paste double-clicked item from CopyQ window?
Open “Preferences” (
Ctrl+P
shortcut).Go to “History” tab.
Enable “Paste to current window” option.
Next time you open the CopyQ main window and activate an item, it should be pasted.
How to paste as plain text?
To paste clipboard as plain text:
Open “Command” dialog (
F6
shortcut).Click “Add” button in the dialog.
Select “Paste clipboard as plain text” from the list and click “OK” button.
Click the button next to “Global Shortcut” label and set the shortcut.
Click “OK” button to save the changes.
To paste selected items as plain text (from CopyQ window) follow the steps above but add “Paste as Plain Text” command instead and change “Shortcut”.
How to store only plain text?
To disallow storing HTML and rich text:
Open “Preferences” (
Ctrl+P
shortcut).Go to “Items” tab.
Disable “Web” item in the list.
Select “Text” item.
Disable “Save and display HTML and rich text”.
Similarly, you can also disable “Images” in the list to avoid storing and rendering images.
Existing items won’t be affected but any data formats can be removed:
Select an item.
Press
F4
shortcut (“Item - Show Content…” in menu).Select format from list.
Press
Delete
key.
How to disable storing clipboard?
To temporarily disable storing the clipboard in the CopyQ item list,
select menu item “File - Disable Clipboard Storing” (Ctrl+Shift+X
shortcut).
To re-enable the functionality select “File - Enable Clipboard Storing” (same shortcut).
To permanently disable storing the clipboard in CopyQ:
Open “Preferences” (
Ctrl+P
shortcut).Go to “History” tab.
Clear “Tab for storing clipboard” field.
How to back up tabs, configuration and commands?
From menu select “File - Export” and choose which tabs to export and whether to export configuration and commands.
To restore the backup, select menu item “File - Import”, select the exported file, and then choose what to import back.
Note
Importing tabs and commands won’t override existing tabs, and will create new ones.
See also: Backup
How to enable or disable displaying notification when clipboard changes?
To enable displaying the notifications:
Open “Preferences” (
Ctrl+P
shortcut).Go to “Notifications” tab.
Set non-zero value for “Interval in seconds to display notifications”.
Set non-zero value for “Number of lines for clipboard notification”.
Click “OK” button.
To enable displaying the notifications, set either of the options mentioned above to zero.
How to omit storing text copied from specific windows like a password manager?
Add and modify automatic command to ignore text copied from the window:
Open “Command” dialog (
F6
shortcut).Click “Add” button in the dialog.
Select “Ignore Password window” from the list and click “OK” Button.
Select “Show Advanced”
Change “Window” text box to match the title (or part of it) of the Window to ignore (e.g.
KeePass
). But for KeePassXC (and possibly other apps), it is better to set “Format” tox-kde-passwordManagerHint
instead (also remember to remove the default that is set in the “Window” setting, since both “Window” and “Format” need to match if they’re set).Click “OK” button to save the changes.
Note
This new command should be at the top of the command list because automatic commands are executed in the order they appear in the list, and we don’t want to process sensitive data in any way.
In some cases, e.g. the password manager is an extension of a web browser or a
password is copied from a menu instead of a window, the command above won’t
work. You can try setting the “Window” text box to ^$
, which usually matches
popup menus.
For a more reliable way, use a command to blacklist texts (it stores just a salted hash, the text itself is not stored anywhere).
How to enable logging?
Set environment variable COPYQ_LOG_LEVEL
to DEBUG
for verbose logging
and set COPYQ_LOG_FILE
to a file path for the log.
You can copy current log file path to clipboard from Action dialog (F5 shortcut)
by entering command copyq 'copy(info("log"))'
. Alternatively, press F12
to directly access the log.
If you cannot access GUI, you can restart CopyQ from terminal and log to a separate file. On Linux and macOS:
copyq exit
export COPYQ_LOG_LEVEL='DEBUG'
export COPYQ_LOG_FILE="$HOME/copyq.log"
echo "Logs will be written to $COPYQ_LOG_FILE"
copyq
On Windows (in PowerShell):
& 'C:\Program Files\CopyQ\copyq.exe' exit
$env:COPYQ_LOG_LEVEL = 'DEBUG'
$env:COPYQ_LOG_FILE = [Environment]::GetFolderPath("MyDocuments") + '\copyq.log'
echo "Logs will be written to $env:COPYQ_LOG_FILE"
& 'C:\Program Files\CopyQ\copyq.exe'
How to preserve the order of copied items when copying or pasting multiple items?
Reverse order of selected items with
Ctrl+Shift+R
and copy them.Alternatively, select items in reverse order and then copy.
See #165.
How does pasting single/multiple items work internally?
Return
key copies the whole item (with all formats) to the clipboard
and – if the “Paste to current window” option is enabled – it sends
Shift+Insert
to previous window. So the target application decides
what format to paste on Shift+Insert
.
If you select more items and press Return
, just the concatenated
text of selected items is put into the clipboard. Though it could do more
in future, like join HTML, images or other formats.
See #165.
Why does pasting from CopyQ not work?
Pasting from CopyQ works only on Windows, macOS and X11 on Linux.
Specifically, this feature is not supported on Wayland, but you can use the workaround: On Linux, global shortcuts, pasting or clipboard monitoring does not work
First, check if you have the appropriate options enabled:
For pasting from main window, enable “Paste to current window” in “History” configuration tab.
For pasting from tray menu, enable “Paste activated item to current window” in “Tray” configuration tab.
If the pasting still doesn’t work, check if Shift+Insert
shortcut pastes to
the target window. That’s the shortcut CopyQ uses by default. To change this to
Ctrl+V
see #633.
If pasting still doesn’t work, it could be caused by either of these problems:
CopyQ fails to focus the target window correctly.
The format copied to the clipboard is not supported by the target application.
How to reuse file paths copied from a file manager?
By default, only the text is stored in item list when you copy or cut files from a file manager. Other data is usually needed to be able to copy/paste files from CopyQ.
You have to add additional data formats (MIME) using an automatic command
(similar to one below). The commonly used format in many file managers is
text/uri-list
. Other special formats include
x-special/gnome-copied-files
for Nautilus and
application/x-kde-cutselection
for Dolphin. These formats are used to
specify type of action (copy or cut).
[Command]
Command="
var originalFunction = global.clipboardFormatsToSave
global.clipboardFormatsToSave = function() {
return originalFunction().concat([
mimeUriList,
'x-special/gnome-copied-files',
'application/x-kde-cutselection',
])
}"
Icon=\xf0c1
IsScript=true
Name=Store File Manager Metadata
How to trigger a command based on primary selection only?
You can check application/x-copyq-clipboard-mode
format in automatic commands.
E.g. if you set input format of a command it will be only executed on Linux mouse selection change:
[Command]
Automatic=true
Command="
copyq:
popup(input())"
Input=application/x-copyq-clipboard-mode
Name=Executed only on X11 selection change
Otherwise you can check it in command:
[Command]
Automatic=true
Command="
copyq:
if (str(data(mimeClipboardMode)) == 'selection')
popup('selection changed')
else
popup('clipboard changed')"
Name=Show clipboard/selection change
Why can I no longer paste from the application on macOS?
Why does my external editor fail to edit items?
CopyQ creates a temporary file with content of the edited item and passes it as argument to the custom editor command. If the file changes, the item is also modified.
Usual issues are:
External editor opens an empty file.
External editor warns that the file is missing.
Saving the file doesn’t have any effect on the origin item.
This happens if the command to launch the editor exits, but the editor application itself is still running. Since the command exited, CopyQ assumes that the editor itself is no longer running, and stops monitoring the changes in the temporary file (and removes the file).
Here is the correct command to use for some editors:
emacsclientw.exe --alternate-editor="" %1
gvim --nofork %1
sublime_text --wait %1
code --wait %1
open -t -W -n %1
Where to find saved items and configuration?
You can find configuration and saved items in:
Windows folder
%APPDATA%\copyq
for installed version of CopyQ.Windows sub-folder
config
in unzipped portable version of CopyQ.Linux directory
~/.config/copyq
.In a directory specific to a given CopyQ instance - see Sessions.
Run copyq info config
to get absolute path to the configuration file
(parent directory contains saved items).
Why are items and configuration not saved?
Check access rights to configuration directory and files.
Why do global shortcuts not work?
Global/system shortcuts (or specific key combinations) don’t work in some desktop environments (e.g. Wayland on Linux).
As a workaround, you can try to assign the shortcuts in your system settings.
To get the command to launch for a shortcut:
Open Command dialog (F6 from main window).
Click on the command with the global shortcut in the left panel.
Enable “Show Advanced” checkbox.
Copy the content of “Command” text field.
Note
If the command looks like this:
copyq: toggle()
the actual command to use is:
copyq -e "toggle()"
Why doesn’t the main window close on tiling window managers?
The main window remains open if it cannot minimize to task bar and tray icon is not available. This is a safety feature to allow users to see that the application is running and make any initial setup when the app is started for the first time.
To force hiding main window:
Open “Preferences” (
Ctrl+P
shortcut).Go to “Layout” tab.
Enable “Hide main window” option.
Alternatively, run the following command:
copyq config hide_main_window true
Why does encryption ask for password so often?
Encryption plugin uses gpg2
to decrypt tabs and items. The password usually
needs to be entered only once every few minutes.
If the password prompt is showing up too often, either increase tab unloading
interval (“Unload tab after an interval” option in “History” tab in
Preferences), or change gpg
configuration (see #946).
How to fix “copyq: command not found” errors?
If you’re getting copyq: command not found
or similar error, it means that
the copyq
executable cannot be found by the shell or a language interpreter.
This usually happens if the executable’s directory is not in the PATH
environmental variable.
If this happens when running from within the command, e.g.
bash:
text="SOME TEXT"
copyq copy "$text"
you can fix it by using COPYQ
environment variable instead.
bash:
text="SOME TEXT"
"$COPYQ" copy "$text"
What to do when CopyQ crashes or misbehaves?
When CopyQ crashes or doesn’t behave as expected, try to look up a similar issue first and provide details in a comment for that issue.
If you cannot find any such an issue, report a new bug.
Try to provide the following details:
CopyQ version
operating system (desktop environment, window manager, etc.)
steps to reproduce the issue
application log (see How to load shared commands and share them?)
stacktrace if available (e.g. on Linux
coredumpctl dump --reverse copyq
)