Debian Codegraph @

docs/tags.rst

raw
1 Tags
2 ====
3
4 Tags are small icons or short texts in upper right corner of an item
5 used to mark important or special items.
6
7 .. image:: images/tags.png
8
9 Tags can be configured in "Items" configuration tab. On Windows, "Item
10 Tags" plugin needs to be installed.
11
12 .. image:: images/tags-config.png
13
14 Configuration consists solely of table where each row contains matching
15 and styling rules for tags.
16
17 Style from the first row which matches tag text is applied on the tag.
18
19 Column in the table are following.
20
21 - "Tag Name"
22
23 Text for the tag. This is used for matching if "Match" column is empty.
24 Expressions like ``\1``, ``\2`` etc. will be replaced with
25 captured texts from "Match" column.
26
27 - "Match"
28
29 Regular expression for matching the tags.
30
31 E.g. ``.*`` (any tag), ``Important: .*`` (match prefix),
32 ``\d\d\d\d-\d\d-\d\d.*`` (date time).
33
34 - "Style Sheet"
35
36 Simple style sheet (https://doc.qt.io/qt-6/stylesheet-reference.html).
37
38 E.g. ``border: 1px solid white; border-radius: 3px; font-size: 7pt``.
39
40 - "Color" - Text color.
41
42 - "Icon" - Icon for tag. To show only icon without text you have to set
43 "Match" and keep "Tag Name" field empty.
44
45 - "Lock" - If enabled, items with such tag will have to be untagged before
46 deleting.
47
48 Tagging items can be accessed from context menu if appropriate commands
49 are added in Command dialog (generated commands are available in the
50 list under "Add" button).
51
52 .. image:: images/tags-add-command.png
53
54 Alternatively, tags are added to an item by setting
55 "application/x-copyq-tags" format. It can contain multiple tags
56 separated by comma. The tag text itself can be written as simple HTML.
57
58 Example:
59
60 ::
61
62 copyq write text/plain "Item with tag" application/x-copyq-tags "Some tag text"