[Command] Name=\x7c98\x8d34\x5f53\x524d\x65f6\x95f4 Command=" copyq: var time = dateString('hh:mm') copy(time) paste() selectItems(0); copy('application/x-copyq-item', pack(getItem(0)));" IsGlobalShortcut=true Icon=\xf017 GlobalShortcut=alt+shift+t
粘贴日期
1 2 3 4 5 6 7 8 9 10 11 12
[Command] Name=\x7c98\x8d34\x5f53\x524d\x65e5\x671f Command=" copyq: var time = dateString('yyyyMMdd') copy(time) paste() selectItems(0); copy('application/x-copyq-item', pack(getItem(0)));" IsGlobalShortcut=true Icon=\xf017 GlobalShortcut=alt+shift+d
复制为纯文本
1 2 3 4 5 6 7 8 9 10 11 12 13
[Command] Name=\x590d\x5236\x4e3a\x7eaf\x6587\x672c Command=" copyq: var text = input() copy(text) copySelection(text) " Input=text/plain InMenu=true HideWindow=true Icon=\xf0ea Shortcut=ctrl+shift+c
去除空行
1 2 3 4 5 6 7 8 9 10 11 12
[Command] Name=去除空行并粘贴 Command=" copyq: var text = str(clipboard()) text = text.replace(/^\\s*[\\r\\n]/gm, '') copy(text) copySelection(text) paste(text)" IsGlobalShortcut=true GlobalShortcut=ctrl+alt+t
去除换行
1 2 3 4 5 6 7 8 9 10 11 12
[Command] Name=去除换行并粘贴 Command=" copyq: var text = str(clipboard()) text = text.replace(/\\n/g, '') copy(text) copySelection(text) paste(text)" IsGlobalShortcut=true GlobalShortcut=ctrl+alt+o
选中文字两边添加双引号
1 2 3 4 5 6 7 8 9 10 11 12 13
[Command] Name=ToggleQuotes Command=" copyq: if (!copy()) abort() var text = str(clipboard()) text = '\x201c' + text + '\x201d' copy(text) paste()" IsGlobalShortcut=true Icon=\xf031 GlobalShortcut=ctrl+q
保存复制时间
1 2 3 4 5 6 7 8 9 10 11 12
[Command] Name=\x4fdd\x5b58\x590d\x5236\x65f6\x95f4 Command=" copyq: var time = dateString('yyyy-MM-dd hh:mm:ss') var tagsMime = 'application/x-copyq-tags' var timeMime = 'application/x-copyq-user-item-time' setData(timeMime, time) setData(tagsMime, time)" Automatic=true Icon=\xf017