A command which provides a dialog for editing Copied Content and entering additional item details like Target Tab, Item Tag and Item Notes, with optional Remove flag.
Technical Implementation
Meta+Ctr+C - used as Global and Application shortcut
If called within the App it fills Tab, Notes, and Content fields with selected item's details
Add Tags dropdown is using [''].concat(userTags) - so field is empty by default
Add Tags field can contain one value, or comma separated list of values which are parsed into array
If called from Global it tries to copy content first to clipboard_tab, and then uses it to show the dialog
On exiting dialog it checks if there was a change - if NO it aborts the script, otherwise it adds the item to a given tab
If Remove flag is checked (by default true) it removes original item
Potential improvements
[x] Add support for adding multiple tags
[x] Figure out is there a way to preset Target Tab field with selectedItem tab (now it always shows &Clipboard as it's the first element in a dropdown list of tab() items)
[x] Support coping/moving multiple items at once
[ ] Figure out if there is a way to add entered tags to plugin.itemtags.userTags array?
[ ] Add support for other content types beside text/plain
[ ] Figure out a better way to expand text fields to support FakeVim mode without programmatically appending \n?
A story behind
I have started using copyq 2-3 days ago, and fell in love with it on first try. The number of features it offers is amazing, and it is so keyboard friendly and convenient to use.
But I have noticed that there was no such command which can offer entering full item details on the fly.
With "Detailed Copy" command it would be possible to enter Tag, Tab and Note for every copied item without the need to write more specific "sweeping commands" for each category like "Add Important Tag" or "Move to Tasks" or "Move to Bookmarks if starting with http".
Image demonstrating Single Item Copy
Image demonstrating Multiple Items Copy
Please note that I have too little experience with CopyQ, and there might be some illogical things in the script, so I would welcome any ideas or suggestions for improvement. And if in any case you feel like this is not something of interest for this project, please ignore and close the PR. :)
Add "Detailed Copy" Global Command
A command which provides a dialog for editing Copied Content and entering additional item details like
Target Tab
,Item Tag
andItem Notes
, with optionalRemove
flag.Technical Implementation
Meta+Ctr+C
- used asGlobal
andApplication
shortcutTab
,Notes
, andContent
fields with selected item's detailsAdd Tags
dropdown is using[''].concat(userTags)
- so field is empty by defaultAdd Tags
field can contain one value, or comma separated list of values which are parsed into arrayclipboard_tab
, and then uses it to show the dialogaborts
the script, otherwise it adds the item to a given tabRemove
flag is checked (by defaulttrue
) it removes original itemPotential improvements
Target Tab
field withselectedItem
tab (now it always shows&Clipboard
as it's the first element in a dropdown list oftab()
items)coping/moving
multiple items at onceplugin.itemtags.userTags
array?text/plain
FakeVim
mode without programmatically appending\n
?A story behind
I have started using copyq 2-3 days ago, and fell in love with it on first try. The number of features it offers is amazing, and it is so keyboard friendly and convenient to use.
But I have noticed that there was no such command which can offer entering full item details on the fly.
With "Detailed Copy" command it would be possible to enter
Tag
,Tab
andNote
for every copied item without the need to write more specific "sweeping commands" for each category like "Add Important Tag" or "Move to Tasks" or "Move to Bookmarks if starting withhttp
".Image demonstrating Single Item Copy
Image demonstrating Multiple Items Copy
Please note that I have too little experience with CopyQ, and there might be some illogical things in the script, so I would welcome any ideas or suggestions for improvement. And if in any case you feel like this is not something of interest for this project, please ignore and close the PR. :)