| 1 |
.. _sessions: |
| 2 |
|
| 3 |
Sessions |
| 4 |
======== |
| 5 |
|
| 6 |
You can run multiple instances of the application given that they have |
| 7 |
different session names. |
| 8 |
|
| 9 |
Running Multiple Instances |
| 10 |
-------------------------- |
| 11 |
|
| 12 |
Each application instance should have unique name. |
| 13 |
|
| 14 |
To start new instance with ``test1`` name, run: |
| 15 |
|
| 16 |
:: |
| 17 |
|
| 18 |
copyq --session=test1 |
| 19 |
|
| 20 |
This instance uses configuration, tabs and items unique to given session |
| 21 |
name. |
| 22 |
|
| 23 |
You can still start default session (with empty session name) with just: |
| 24 |
|
| 25 |
:: |
| 26 |
|
| 27 |
copyq |
| 28 |
|
| 29 |
In the same manner you can manipulate the session. E.g. to add an item |
| 30 |
to first tab in ``test1`` session, run: |
| 31 |
|
| 32 |
:: |
| 33 |
|
| 34 |
copyq --session=test1 add "Some text" |
| 35 |
|
| 36 |
Default session has empty name but it can be overridden by setting |
| 37 |
``COPYQ_SESSION_NAME`` environment variable. |
| 38 |
|
| 39 |
You need to use same session name for clients launched outside the application. |
| 40 |
|
| 41 |
:: |
| 42 |
|
| 43 |
$ copyq -s test2 tab |
| 44 |
ERROR: Cannot connect to server! Start CopyQ server first. |
| 45 |
|
| 46 |
$ copyq -s test1 tab |
| 47 |
&clipboard |
| 48 |
|
| 49 |
Configuration Path |
| 50 |
------------------ |
| 51 |
|
| 52 |
Current configuration path can be overridden with ``COPYQ_SETTINGS_PATH`` |
| 53 |
environment variable. |
| 54 |
|
| 55 |
:: |
| 56 |
|
| 57 |
$ copyq info config |
| 58 |
/home/user/.config/copyq/copyq.conf |
| 59 |
|
| 60 |
$ COPYQ_SETTINGS_PATH=$HOME/copyq-settings copyq info config |
| 61 |
/home/user/copyq-settings/copyq/copyq.conf |
| 62 |
|
| 63 |
You need to use same configuration path (and session name) for clients launched |
| 64 |
outside the application. |
| 65 |
|
| 66 |
:: |
| 67 |
|
| 68 |
$ copyq tab |
| 69 |
ERROR: Cannot connect to server! Start CopyQ server first. |
| 70 |
|
| 71 |
$ COPYQ_SETTINGS_PATH=$HOME/copyq-settings copyq tab |
| 72 |
&clipboard |
| 73 |
|
| 74 |
Item Data Path |
| 75 |
-------------- |
| 76 |
|
| 77 |
Item data path can be overridden with ``COPYQ_ITEM_DATA_PATH`` |
| 78 |
environment variable. |
| 79 |
|
| 80 |
:: |
| 81 |
|
| 82 |
$ copyq info data |
| 83 |
/home/user/.local/share/copyq/copyq |
| 84 |
|
| 85 |
$ COPYQ_ITEM_DATA_PATH=$HOME/copyq-data copyq info data |
| 86 |
/home/user/copyq-data/copyq/copyq.conf |
| 87 |
|
| 88 |
The directory contains data for items that exceeds 4096 bytes. The default |
| 89 |
threshold can be overridden with ``item_data_threshold`` option. |
| 90 |
|
| 91 |
:: |
| 92 |
|
| 93 |
$ copyq config item_data_threshold |
| 94 |
4096 |
| 95 |
|
| 96 |
To disable using the data directory and store everything into tab data files, |
| 97 |
set the threshold to a negative value. The tab data file will be updated only |
| 98 |
after the items in the tab change. |
| 99 |
|
| 100 |
:: |
| 101 |
|
| 102 |
$ copyq config item_data_threshold -1 |
| 103 |
-1 |
| 104 |
|
| 105 |
Note: Using data directory ensure that the application is fast even if there |
| 106 |
are a lot of large items in tabs. |
| 107 |
|
| 108 |
Icon Color |
| 109 |
---------- |
| 110 |
|
| 111 |
Icon for each session is bit different. The color is generated from session |
| 112 |
name and can be changed using ``COPYQ_SESSION_COLOR`` environment variable. |
| 113 |
|
| 114 |
:: |
| 115 |
|
| 116 |
COPYQ_SESSION_COLOR="yellow" copyq |
| 117 |
COPYQ_SESSION_COLOR="#f90" copyq |
| 118 |
|
| 119 |
On Linux, changing icon color won't work if current icon theme contains icon |
| 120 |
named "copyq-normal" or doesn't contain "copyq-mask". |
| 121 |
Use ``COPYQ_DEFAULT_ICON`` environment variable to avoid using the application |
| 122 |
icon from icon theme. |
| 123 |
|
| 124 |
:: |
| 125 |
|
| 126 |
COPYQ_DEFAULT_ICON=1 copyq |