-
Notifications
You must be signed in to change notification settings - Fork 1
/
copyq-commands.ini
75 lines (68 loc) · 1.7 KB
/
copyq-commands.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[Commands]
1\Command="
var timeoutMilliseconds = 500;
function reset(key, getFn, setFn) {
if (hasData()) {
settings(key, [data(mimeText), Date.now()])
} else {
var last = settings(key)
if (!last)
return;
afterMilliseconds(timeoutMilliseconds, function() {
if (!str(getFn()) && last[1] == settings(key)[1]) {
serverLog('Reset from ' + key)
setFn(mimeText, last[0], mimeHidden, 1)
}
})
}
}
function resetClipboard() {
reset('lastClipboard', clipboard, copy)
}
function resetSelection() {
reset('lastSelection', selection, copySelection)
}
var onClipboardChanged_ = onClipboardChanged
onClipboardChanged = function() {
onClipboardChanged_()
isClipboard() ? resetClipboard() : resetSelection()
if (!hasData())
sleep(2 * timeoutMilliseconds)
}"
1\Icon=\xf246
1\IsScript=true
1\Name=Reset Empty Clipboard/Selection
2\Command="
copyq:
var shortcut = str(data(mimeShortcut))
var row = currentItem()
if (shortcut == 'ctrl+j' || shortcut == 'ctrl+n')
selectItems(row + 1)
else
selectItems(row - 1)"
2\Icon=\xf338
2\InMenu=true
2\Name=Up/Down
2\Shortcut=ctrl+j, ctrl+k, ctrl+n, ctrl+p
3\Command="
copyq:
edit(currentItem())"
3\Icon=\xf044
3\InMenu=true
3\Name=Edit Current
3\Shortcut=f2
4\Automatic=true
4\Icon=\xf21b
4\Input=x-kde-passwordManagerHint
4\Name=KeePassXC protector v3
4\Remove=true
5\Command="
copyq:
open(input().text())"
5\HideWindow=true
5\Icon=\xf0ac
5\InMenu=true
5\Input=application/x-copyq-item-notes
5\Name=Open in Browser
5\Shortcut=ctrl+i
size=5