FAQ - Frequently Asked Questions¶
How to paste double-clicked item from application window?¶
- Open “Preferences” (
Ctrl+P
shortcut), - go to “History” tab,
- enable “Paste to current window” option.
Next time you open 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 application 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,
- and 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 clipboard in 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 clipboard:
- 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 what tabs to export and whether to export configuration and commands.
To restore the backup select menu item “File - Import”, select the exported file and choose what to import back.
Note
Importing tabs and commands won’t override existing tabs but create new ones.
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
), - click “OK” button to save the changes.
Note
This new command should be at top of the command list because automatic commands are executed in order they appear in the list and we don’t want to process sensitive data in any way.
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.
How to preserve the order of copied items on copy or pasting multiple items?¶
- Reverse order of selected items with
Ctrl+Shift+R
and copy them or - select items in reverse order and copy.
See #165.
How does pasting single/multiple items internally work?¶
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 clipboard. Thought it could do more
in future, like join HTML, images or other formats.
See #165.
How to reuse file paths copied from a file manager?¶
By default only the text is stored in item list when you copy of cut files from a file manager. Other data are 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). Commonly used format in many file managers is
text/uri-list
. Other special formats include
x-special/gnome-copied-files
for Nautilus,
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 would be only executed on X11 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?¶
To fix this you can try following steps.
- Go to System Preferences -> Security & Privacy -> Privacy -> Accessibility (or just search for “Allow apps to use Accessibility”),
- click the unlock button,
- select CopyQ from the list and remove it (with the “-” button).
See also Issue #1030.
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 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 or
- saving the file doesn’t have any effect on the origin item.
This happens if the command to launch 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 temporary file (and removes the file).
Here is the correct command to use for some editors:
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 the app orconfig
folder in unzipped portable version, - Linux directory
~/.config/copyq
.
Run copyq info config
to get absolute path to the configuration file
(parent directory contains saved items).
Note
Main configuration for installed version of the app on Windows is stored in registry.
Why are items and configuration not saved?¶
Check access rights to configuration directory and files.
Why global shortcuts don’t 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),
- in left panel, click on the command with the global shortcut,
- 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 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
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 application crashes or misbehaves?¶
When the application crashes or doesn’t behave as expected, try to look up similar issue first and provide details in a comment.
If you cannot find any such issue, report a new bug.
Try to provide following detail.
- Application version
- Operating System (desktop environment, window manager etc.)
- Steps to reproduce the issue.
- Application log (see How to load shared commands and share them?)
- Back trace if available (e.g. on Linux
coredumpctl dump --reverse copyq
)