Skip to content

Instantly share code, notes, and snippets.

@hluk
hluk / CopyQ - URLs.ini
Last active August 20, 2019 05:33
CopyQ - Tab for URLs with Title and Icon
[Command]
Automatic=true
Command="
copyq:
var tabName = '&url'
function lower(data) {
return str(data).toLowerCase()
}
@hluk
hluk / snippets.ini
Last active December 8, 2019 14:55
CopyQ - Snippets Command (with custom dialog position)
[Command]
Command="
copyq:
var x = 1850
var y = 1000
var snippetsTabName = 'Snippets'
// List snippets instead of search combo box?
var listSnippets = false
@hluk
hluk / CopyQ - Synchronize Clipboard with Other Sessions.ini
Created December 21, 2015 10:00
CopyQ - Synchronize Clipboard with Other Sessions
[Command]
Automatic=true
Command="
copyq:
// Select session to send data to.
var sessions = [
\"my_session_2\",
\"my_session_3\",
\"my_session_4\",
]
@hluk
hluk / CopyQ - Save As.ini
Last active March 18, 2022 14:53
CopyQ - Save Item/Clipboard To a File
[Command]
Command="
copyq:
var suffices = {
'image/svg': 'svg',
'image/png': 'png',
'image/jpeg': 'jpg',
'image/jpg': 'jpg',
'image/bmp': 'bmp',
'text/html': 'html',
@hluk
hluk / CopyQ - Undoable Move to Trash.ini
Last active July 14, 2022 18:01
CopyQ 2.3.0 user commands to move items to trash and undo the removal
[Commands]
1\Name=Move to Trash (Undoable)
1\Command="
copyq:
trash_tab = \"(trash)\"
tab_mime = \"application/x-copyq-user-tab\"
index_mime = \"application/x-copyq-user-index\"
time_mime = \"application/x-copyq-user-time\"
@hluk
hluk / replace_selected_with_script.ini
Created June 3, 2019 12:54
CopyQ Command: Replace selected text with a script
[Command]
Command="
copyq:
// path to python script
// (always use forward slash as path separator)
script = 'c:/scripts/modify_text.py'
// get old text from clipboard
var oldText = str(clipboard())
@hluk
hluk / CopyQ - Snippets.ini
Last active August 16, 2023 10:20
CopyQ - Dialog for Pasting Snippets
[Command]
Command="
copyq:
var snippetsTabName = 'Snippets'
function newVarRe(content) {
return new RegExp('\\\\${' + content + '}', 'g')
}
function getText(item) {
@hluk
hluk / CopyQ - Search All Tabs.ini
Created November 19, 2015 07:30
CopyQ - Search All Tabs
[Command]
Name=Search All Tabs
Command="
copyq:
// Name for tab for storing matching items.
var search_tab_name = \"Search\"
// Returns true iff item at index matches regex.
function item_matches(item_index, re)
{