Warning, /plasma/plasma-workspace/doc/klipper/index.docbook is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" ?>
0002 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" 
0003 "dtd/kdedbx45.dtd" [
0004   <!ENTITY kappname "&klipper;">
0005   <!ENTITY package "kdebase">
0006   <!ENTITY % addindex "IGNORE">
0007   <!ENTITY % English "INCLUDE" > <!-- change language only here -->
0008 ]>
0009 
0010 <book id="klipper" lang="&language;">
0011 <bookinfo>
0012 <title>The &klipper; Handbook </title>
0013 
0014 <authorgroup>
0015 <author>&Philip.Rodrigues; &Philip.Rodrigues.mail;</author>
0016 
0017 <othercredit role="developer">
0018 &Carsten.Pfeiffer; &Carsten.Pfeiffer.mail;
0019 <!-- <contrib>Developer</contrib> -->
0020 </othercredit>
0021 
0022 <!-- TRANS:ROLES_OF_TRANSLATORS -->
0023 
0024 </authorgroup>
0025 
0026 <copyright>
0027 <year>2000-2003</year>
0028 <holder>&Philip.Rodrigues;</holder>
0029 </copyright>
0030 
0031 <legalnotice>&FDLNotice;</legalnotice>
0032 
0033 <date>2022-05-05</date>
0034 <releaseinfo>Plasma 5.25</releaseinfo>
0035 
0036 <abstract>
0037 <para>&klipper; is the &plasma; clipboard cut &amp; paste utility.</para>
0038 </abstract>
0039 
0040 <keywordset>
0041 <keyword>KDE</keyword>
0042 <keyword>Klipper</keyword>
0043 <keyword>kdebase</keyword>
0044 <keyword>clipboard</keyword>
0045 </keywordset>
0046 </bookinfo>
0047 <!--http://blog.martin-graesslin.com/blog/2014/07/next-generation-klipper/-->
0048 <chapter id="introduction">
0049 <title>Introduction</title>
0050 <para>&klipper; is the &plasma; clipboard utility. It stores clipboard
0051 history, and allows you to link clipboard contents to application
0052 actions. Please report any problems or feature requests to <ulink
0053 url="http://bugs.kde.org">KDEs bugzilla</ulink>.</para>
0054 
0055 </chapter>
0056 
0057 <chapter id="using-klipper">
0058 <title>Using &klipper;</title>
0059 
0060 <sect1 id="basic-usage">
0061 <title>Basic Usage</title>
0062 <para>You can use &klipper; in the systemtray either as &plasma; widget or classic application.
0063 Both share the same functionality but have a different &GUI; and show the last item of the history 
0064 when hovering the &klipper; icon in the systemtray:
0065 </para>
0066 
0067 <screenshot>
0068 <screeninfo>The &klipper; icon.</screeninfo>
0069 <mediaobject>
0070 <imageobject>
0071 <imagedata fileref="screenshot.png" format="PNG" />
0072 </imageobject>
0073 <textobject>
0074 <phrase>The &klipper; icon</phrase>
0075 </textobject>
0076 </mediaobject>
0077 </screenshot>
0078 
0079 <para>The &klipper; widget is hidden if the clipboard is empty.</para>
0080 
0081 <para>To display the clipboard history, click on the &klipper; icon in
0082 the systemtray.</para>
0083 
0084 <sect2 id="klipper-widget">
0085 <title>&klipper; Widget</title>
0086 <screenshot>
0087 <screeninfo>The &klipper; Widget.</screeninfo>
0088 <mediaobject>
0089 <imageobject>
0090 <imagedata fileref="klipper-widget.png" format="PNG" />
0091 </imageobject>
0092 <textobject>
0093 <phrase>The &klipper; Widget</phrase>
0094 </textobject>
0095 </mediaobject>
0096 </screenshot>
0097 
0098 <para>Hover an entry with the mouse pointer and four icons appear which enable you to 
0099 invoke an action, show the barcode, edit the content or remove the entry from the history.
0100 Use &spectacle; to capture the barcodes and save them.
0101 </para>
0102 
0103 <para>You can search through the clipboard history by opening it
0104 (click on &klipper;) and typing your query. The results are updated as
0105 you type. To clear the clipboard history click on the icon at the right of
0106 the search field.
0107 </para>
0108 
0109 <para>The <guilabel>Configure Clipboard...</guilabel> action in the context menu opens the 
0110 <link linkend="preferences">settings dialog</link>.
0111 </para>
0112 
0113 </sect2>
0114 </sect1>
0115 
0116 <sect1 id="actions">
0117 <title>Actions</title>
0118 
0119 <para>&klipper; can perform actions on the contents of the clipboard,
0120 based on whether they match a particular regular expression. For
0121 example, any clipboard contents starting with <quote>http://</quote> can
0122 be passed to Firefox or &konqueror; as &URL;s to open. In addition, if the 
0123 contents matches a path, similar actions can be performed according to the file's
0124 type. &eg;, if the path to a <acronym>PDF</acronym> file is copied to the clipboard, the file can be 
0125 viewed in &okular;.</para>
0126 
0127 <para>To use this feature, just select a &URL; or path. <!-- starting with slash ?-->
0128 If there is a matching regular expression in &klipper;'s
0129 list, a menu will appear showing you the programs for your selection. 
0130 Use the mouse or cursor keys to select a program, and &klipper; will run 
0131 this program, opening the address pointed to by the
0132 selection.</para>
0133 
0134 <para>If you do not want to perform any actions on the clipboard
0135 contents, select <guimenuitem>Disable This Popup</guimenuitem> on the pop-up menu
0136 to return to what you were doing before. If you leave the menu, it will
0137 disappear, leaving you to continue your work. You can change the time
0138 that the menu remains for in the settings 
0139 dialog, with the option <guilabel>Show action popup menu</guilabel>
0140 under the <guilabel>General</guilabel> page. You can separately disable the 
0141 file path part using the option <guilabel>Include MIME actions</guilabel> under
0142 the <guilabel>Action Menu</guilabel> page.</para>
0143 
0144 <para>Actions can be disabled completely by pressing
0145 the shortcut <keycombo action="simul">&Ctrl;&Alt;<keycap>X</keycap></keycombo>.</para>
0146 
0147 <para>Clipboard contents which match a regular expression can also be
0148 edited before performing an action on them. Select <guimenuitem>Edit 
0149 contents...</guimenuitem> at the right of the clipboard entry, and you can
0150 change the clipboard contents in the dialog which appears, before
0151 clicking the <guibutton>OK</guibutton> button to run the appropriate
0152 action.</para>
0153 
0154 <para>Pressing <keycombo
0155 action="simul">&Ctrl;&Alt;<keycap>R</keycap></keycombo> shows the pop-up
0156 menu to repeat the last action which &klipper; performed.</para>
0157 
0158 </sect1>
0159 
0160 <sect1 id="clipboard-modes">
0161 <title>Clipboard/Selection Behavior</title>
0162 
0163 <sect2 id="clipboard-modes-general">
0164 <title>General</title>
0165 <para>
0166 &klipper; can be used to set the behavior of the clipboard and selection in
0167 &plasma;. 
0168 </para>
0169 
0170 <note><para>The &X-Window; uses two separate clipboard buffers: the
0171 <quote>selection</quote> and the <quote>clipboard</quote>. Text is
0172 placed in the selection buffer by simply selecting it, and can be
0173 pasted with the middle mouse button. To place text in
0174 the clipboard buffer, select it and press
0175 <keycombo>&Ctrl;<keycap>X</keycap> </keycombo> or
0176 <keycombo>&Ctrl;<keycap>C</keycap> </keycombo>. Text from the
0177 clipboard buffer is pasted using <keycombo>&Ctrl;<keycap>V</keycap>
0178 </keycombo> or by selecting <guimenuitem>Paste</guimenuitem> 
0179 in a context menu.</para>
0180 </note>
0181 
0182 </sect2>
0183 
0184 <sect2 id="changing-clipboard-modes">
0185 <title>Changing Clipboard/Selection Behavior</title>
0186 <para>
0187 In order to change clipboard/selection behavior, select
0188 <guimenuitem>Configure Clipboard...</guimenuitem> from the &klipper; context menu,
0189 and in the dialog box that appears, select the
0190 <guilabel>General</guilabel> page. Unchecking <guilabel>Selection and Clipboard</guilabel> makes the clipboard and selection function as completely
0191 separate buffers as described above. With this option set, the option
0192 <guilabel>Ignore</guilabel> will prevent &klipper; from
0193 including the contents of the selection in its clipboard history and from
0194 performing actions on the contents of the selection. Selecting
0195 <guilabel>Selection and Clipboard</guilabel>
0196 causes the clipboard and selection buffers to always be the same, meaning that
0197 text in the selection can be pasted with either the
0198 <mousebutton>middle</mousebutton> mouse button or the key combination <keycombo>&Ctrl;<keycap>V</keycap>
0199 </keycombo>, and similarly for text in the clipboard buffer.
0200 </para>
0201 
0202  <!-- The
0203 <guilabel>Synchronize contents of the clipboard and the
0204 selection</guilabel> check box determines the clipboard mode. If the box is
0205 selected, the clipboard functions in the &UNIX; mode; if not, the
0206 &Windows;/&Mac; mode is used. -->
0207 
0208 </sect2>
0209 
0210 
0211 </sect1>
0212 
0213 </chapter>
0214 
0215 <chapter id="preferences">
0216 <title>Configuring &klipper;</title>
0217 
0218 <sect1 id="general-page">
0219 <title>General Options</title>
0220 
0221 <variablelist>
0222 
0223 <varlistentry><term><guilabel>Selection and Clipboard</guilabel></term>
0224 <listitem><para>When text or an area of the screen is highlighted with the mouse or 
0225 keyboard, this is the <emphasis>selection</emphasis>. It can be pasted using 
0226 the middle mouse button.</para><para>If the selection is explicitly copied 
0227 using a <guimenuitem>Copy</guimenuitem> or <guimenuitem>Cut</guimenuitem> action, it 
0228 is saved to the <emphasis>clipboard</emphasis>. It can be pasted using a 
0229 <guimenuitem>Paste</guimenuitem> action.</para><para>When turned on this option 
0230 keeps the selection and the clipboard the same, so that any selection is 
0231 immediately available to paste by any means. If it is turned off, the 
0232 selection may still be saved in the clipboard history (subject to the 
0233 options below), but it can only be pasted using the middle mouse button.</para></listitem>
0234 </varlistentry>
0235 
0236 <varlistentry><term><guilabel>Clipboard history</guilabel></term>
0237 <listitem><para>Toggles clipboard history.</para></listitem>
0238 </varlistentry>
0239 
0240 <varlistentry><term><guilabel>Number of entries</guilabel></term>
0241 <listitem><para>Sets the number of items that are stored
0242 in the clipboard history.</para></listitem>
0243 </varlistentry>
0244 
0245 <varlistentry>
0246 <term><guilabel>Text selection</guilabel></term>
0247 <listitem><para>When an area of the screen is selected with mouse or keyboard, this is 
0248 called the <quote>selection</quote>. This option determines whether text selections are
0249 saved in the clipboard history. It is possible to choose between <guilabel>Always save
0250 in history</guilabel> and <guilabel>Only when explicitly copied</guilabel>. The
0251 <guilabel>Always save in history</guilabel> option is not available if
0252 selection/clipboard synchronisation is turned off &dash; in this
0253 case the selection is never automatically saved in the clipboard history.
0254 See <xref linkend="clipboard-modes"/>.
0255 </para>
0256 </listitem>
0257 </varlistentry> 
0258 
0259 <varlistentry>
0260 <term><guilabel>Non-text selection</guilabel></term>
0261 <listitem><para>This option determines whether non-text selections (such as images) are
0262 saved in the clipboard history. It is possible to choose between <guilabel>Always save
0263 in history</guilabel>, <guilabel>Only when explicitly copied</guilabel>, and
0264 <guilabel>Never save in history</guilabel>. The <guilabel>Always save in
0265 history</guilabel> option is not available if selection/clipboard synchronisation
0266 is turned off &dash; in this case the selection is never automatically saved in the
0267 clipboard history. See <xref linkend="clipboard-modes"/>.
0268 </para>
0269 </listitem>
0270 </varlistentry> 
0271 
0272 </variablelist>
0273 
0274 </sect1>
0275 
0276 <sect1 id="action-menu-page">
0277 <title>Action Menu</title>
0278 
0279 <variablelist>
0280 
0281 <varlistentry>
0282 <term><guilabel>Show action popup menu</guilabel></term>
0283 <listitem><para>Set the time that a popup menu will remain for if you do
0284 nothing with it.</para></listitem>
0285 </varlistentry>
0286 
0287 <varlistentry>
0288 <term><guilabel>Replay actions on an item selected from
0289 history</guilabel></term>
0290 <listitem><para>If this is switched on, selecting an item from the history
0291 causes &klipper; to display the actions pop-up on that item, if 
0292 appropriate.</para>
0293 </listitem>
0294 </varlistentry>
0295 
0296 <varlistentry><term><guibutton>Exclude Windows</guibutton></term>
0297 <listitem><para>Brings up the <guilabel>Disable Actions for windows of type
0298 WM_CLASS</guilabel> dialog.</para>
0299 <para>Some programs, such as &konqueror;,
0300 use the clipboard internally. If you get unwanted &klipper; pop-ups all the time
0301 when using a certain application, do the following:</para>
0302 
0303 <orderedlist>
0304 <listitem><para>Open the application.</para></listitem>
0305 <listitem><para>From a terminal, run <userinput><command>xprop</command>
0306 | <command>grep</command> <parameter>WM_CLASS</parameter></userinput>
0307 and then click on the window of the application you are
0308 running.</para></listitem> 
0309 <listitem><para>The first string after the equals sign is the one to
0310 enter.</para></listitem>
0311 </orderedlist>
0312 
0313 <para>Once the WM_CLASS is added, no more actions will be generated for
0314 windows of that application.</para>
0315 </listitem>
0316 </varlistentry>
0317 
0318 <varlistentry>
0319 <term><guilabel>Remove white space when executing actions</guilabel></term>
0320 <listitem><para>If selected, any white space (spaces, tabs, &etc;) at the
0321 beginning and end of the clipboard contents will be removed before passing the
0322 clipboard contents to an application. This is useful, for example, if the
0323 clipboard contains a &URL; with spaces which, if opened by a web browser, would
0324 cause an error.</para>
0325 </listitem>
0326 </varlistentry>
0327 
0328 <varlistentry>
0329 <term><guilabel>Include MIME actions</guilabel></term>
0330 <listitem><para>If selected, include applications that can accept its 
0331 &MIME; type of a file name or URL selected in the popup menu.</para>
0332 </listitem>
0333 </varlistentry>
0334 </variablelist>
0335 </sect1>
0336 
0337 <sect1 id="actions-configuration-page">
0338 <title>Actions Configuration</title>
0339 
0340 <variablelist>
0341 <varlistentry>
0342 <term>Editing Expressions/Actions</term>
0343 <listitem><para>On the <guilabel>Actions</guilabel> page, double-click
0344 the regular expression or action that you want to edit or select it and 
0345 press the <guibutton>Edit Action</guibutton> button. A dialog will appear in which the 
0346 expression text can be edited as you wish.</para></listitem>
0347 </varlistentry>
0348 
0349 <varlistentry>
0350 <term>Adding Expressions/Actions</term>
0351 <listitem><para>Click the <guibutton>Add Action...</guibutton> button
0352 to add a regular expression for &klipper; to match. &klipper; uses
0353 &Qt;'s <classname>QRegularExpression</classname>, which uses PCRE (Perl
0354 Compatible Regular Expressions).</para>
0355 <para>You can add a description of the regular expression type (&eg;
0356 <quote>HTTP URL</quote>) by <mousebutton>left</mousebutton> clicking in the
0357 <guilabel>Description</guilabel> column.</para>   
0358 
0359 <note><para>You can find detailed information about the use of
0360 <classname>QRegularExpression</classname> regular expressions in <ulink
0361 url="https://doc.qt.io/qt-5/qregularexpression.html#details">the Qt upstream
0362 documentation</ulink>.</para></note>
0363 
0364 <para>Edit the regular expression as described above. To add a command
0365 to execute, click <guimenuitem>Add Command</guimenuitem> and edit the command 
0366 in an in-place text editing box. Double-clicking on a command allows you to edit it.</para>
0367 
0368 <para>Note that <token>%s</token> in the command line is replaced with
0369 the clipboard contents, &eg; if your command definition is
0370 <userinput><command>kwrite</command> <token>%s</token></userinput> and
0371 your clipboard contents are <filename>/home/phil/textfile</filename>,
0372 the command <userinput><command>kwrite</command>
0373 <filename>/home/phil/textfile</filename></userinput> will be run. To
0374 include <token>%s</token> in the command line, escape it with a
0375 backslash, as so: <userinput>\%s</userinput>.</para>
0376 
0377 <para>Entries <userinput><token>%0</token></userinput> through
0378 <userinput><token>%9</token></userinput> will be replaced by the corresponding captured
0379 texts from the match pattern.
0380 </para>
0381 </listitem>
0382 </varlistentry>
0383 </variablelist>
0384 
0385 </sect1>
0386 
0387 <sect1 id="shortcuts-page">
0388 <title>Shortcuts Options</title>
0389 
0390 <para>The shortcuts page allows you to change the keyboard shortcuts
0391 which are used to access &klipper; functions. You can change the
0392 shortcut to one of three things:</para>
0393 
0394 <variablelist>
0395 <varlistentry>
0396 <term><guilabel>None</guilabel></term>
0397 <listitem><para>The selected action cannot be accessed directly from the
0398 keyboard</para></listitem>
0399 </varlistentry>
0400 <varlistentry>
0401 <term><guilabel>Default</guilabel></term>
0402 <listitem><para>The selected action uses &klipper;'s default key. These are the
0403 shortcuts referred to in this manual.</para></listitem>
0404 </varlistentry>
0405 <varlistentry>
0406 <term><guilabel>Custom</guilabel></term>
0407 <listitem><para>The selected action is assigned to the keys you choose.</para>
0408 <para>To choose a custom key for the action you have selected, click on 
0409 <guilabel>Custom</guilabel> and then <guilabel>None</guilabel>.
0410 Now type the desired key combination on your keyboard, as in any &kde; application. 
0411 </para> </listitem>
0412 </varlistentry>
0413 </variablelist>
0414 
0415 <para>If you define a shortcut for <guilabel>Open Klipper at Mouse Position</guilabel> 
0416 pressing this shortcut will open the &klipper; popup menu at the position of
0417 the mouse cursor, instead of their default position (in the &plasma; Panel).
0418 Useful if you use the mouse more than the keyboard.</para>
0419 
0420 </sect1>
0421 </chapter>
0422 
0423 <chapter id="credits">
0424 <title>Credits and License</title>
0425 
0426 <para>
0427 &klipper;
0428 </para>
0429 <para>
0430 Program copyright 1998 &Andrew.Stanley-Jones; <email>asj@cban.com</email>
0431 </para>
0432 <para>
0433 Program copyright 1998-2000 &Carsten.Pfeiffer; &Carsten.Pfeiffer.mail;</para>
0434 <para>
0435 Currently maintained by Esben Mose Hansen. See <ulink
0436 url="http://mosehansen.dk/about">http://mosehansen.dk/about</ulink>
0437 for contact details.
0438 </para>
0439 
0440 <para>
0441 Documentation copyright 2000-2003, 2005 &Philip.Rodrigues;
0442 &Philip.Rodrigues.mail;</para>
0443 
0444 <!-- TRANS:CREDIT_FOR_TRANSLATORS -->
0445 &underFDL;
0446 &underGPL;
0447 
0448 </chapter>
0449 
0450 
0451 &documentation.index; 
0452 
0453 </book>
0454 <!--
0455 Local Variables:
0456 mode: sgml
0457 sgml-minimize-attributes: nil
0458 sgml-general-insert-case: lower
0459 sgml-indent-step: 0
0460 End:
0461 -->
0462 
0463 
0464 
0465 
0466 
0467 
0468 
0469 
0470 
0471