-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopyq.ini
92 lines (92 loc) · 2.9 KB
/
copyq.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[Commands]
1\Command="
copyq: menu()"
1\GlobalShortcut=meta+alt+s
1\Icon=
1\IsGlobalShortcut=true
1\Name=Show the tray menu
2\Command="
copyq: toggle()"
2\GlobalShortcut=meta+alt+c
2\Icon=
2\IsGlobalShortcut=true
2\Name=Toggle main window
3\Command="
copyq: edit(-1)"
3\GlobalShortcut=meta+alt+v
3\Icon=
3\IsGlobalShortcut=true
3\Name=Edit clipboard
4\Command="
copyq: paste(); previous()"
4\GlobalShortcut=meta+alt+k
4\Icon=
4\IsGlobalShortcut=true
4\Name=Paste and copy previous
5\Command="
copyq: paste(); next()"
5\GlobalShortcut=meta+alt+j
5\Icon=
5\IsGlobalShortcut=true
5\Name=Paste and copy next
6\Command="
copyq:
var text = clipboard()
copy(text)
copySelection(text)
paste()"
6\GlobalShortcut=meta+alt+x
6\Icon=
6\IsGlobalShortcut=true
6\Name=Paste clipboard as plain text
7\Command="
copyq:
function unix2dote(unix, zone, offset = 719468) {
return [
(unix ?? Date.now()) / 86400000
+ (zone = zone ?? (10 - Math.round(
(new Date).getTimezoneOffset() / 144)) % 10
) / 10 + offset, zone]
}
function dote2doty(dote = 719468, zone = 0) {
const cykl = Math.floor((dote >= 0 ? dote : dote - 146096) / 146097), dotc = dote - cykl * 146097,
yotc = Math.floor((dotc - Math.floor(dotc / 1460) + Math.floor(dotc / 36524) - Math.floor(dotc / 146096)) / 365);
return [yotc + cykl * 400, dotc + Math.floor(yotc / 100) - yotc * 365 - Math.floor(yotc / 4), zone];
}
function doty2deco(year = 1969, doty = 306, zone = 0) {
return `${year.toString().padStart(4, \"0\")}+${Math.floor(doty).toString().padStart(3, \"0\")}`
}
const datetime = doty2deco(...dote2doty(...unix2dote(Date.now())))
copy(datetime)
copySelection(datetime)
paste()"
7\GlobalShortcut=meta+alt+d
7\Icon=
7\IsGlobalShortcut=true
7\Name=Paste current Dec date
8\Command="
copyq:
function unix2dote(unix, zone, offset = 719468) {
return [
(unix ?? Date.now()) / 86400000
+ (zone = zone ?? (10 - Math.round(
(new Date).getTimezoneOffset() / 144)) % 10
) / 10 + offset, zone]
}
function dote2doty(dote = 719468, zone = 0) {
const cykl = Math.floor((dote >= 0 ? dote : dote - 146096) / 146097), dotc = dote - cykl * 146097,
yotc = Math.floor((dotc - Math.floor(dotc / 1460) + Math.floor(dotc / 36524) - Math.floor(dotc / 146096)) / 365);
return [yotc + cykl * 400, dotc + Math.floor(yotc / 100) - yotc * 365 - Math.floor(yotc / 4), zone];
}
function doty2deco(year = 1969, doty = 306, zone = 0) {
return `${year.toString().padStart(4, \"0\")}+${(doty * 10).toFixed(4).padStart(8, \"0\")}-${zone}`
}
const datetime = doty2deco(...dote2doty(...unix2dote(Date.now())))
copy(datetime)
copySelection(datetime)
paste()"
8\GlobalShortcut=meta+alt+t
8\Icon=
8\IsGlobalShortcut=true
8\Name=Paste current Dec timestamp
size=8