<!--
    SPDX-FileCopyrightText: 2000-2003 Shie Erlich <erlich@users.sourceforge.net>
    SPDX-FileCopyrightText: 2000-2003 Rafi Yanai <yanai@users.sourceforge.net>
    SPDX-FileCopyrightText: 2004-2010 Frank Schoolmeesters <codeknight@users.sourceforge.net>
    SPDX-FileCopyrightText: 2000-2022 Krusader Krew <https://krusader.org>
-->
<appendix id="useraction-xml">
  <title
>useractions.xml</title>
  <para
>Aquest apèndix ofereix diversos exemples de fitxers <filename
>useractions.xml</filename
>. Amb aquests, podreu començar a descobrir la potència de les <link linkend="useractions"
>Accions d'usuari</link
> i començar a aprendre a emprar-les. Una vegada enteneu com escriure Accions d'usuari, trobareu que el &krusader; és una eina encara més potent i personalitzable.</para>
  <para
>Considereu pujar les vostres Accions d'usuari a la <ulink url="https://store.kde.org"
>store.kde.org</ulink
>, ja que les estem recopilant. Si seleccionem la vostra Acció d'usuari, serà publicada amb el &krusader; a la pròxima versió.</para>

<itemizedlist>
    <listitem
><para
>Executa <command
>uptime</command
> <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
 &lt;KrusaderUserActions&gt;
  &lt;action name="uptime" &gt;
  &lt;title&gt;Up-time&lt;/title&gt;
  &lt;tooltip&gt;tells how long since the computer has been booted&lt;/tooltip&gt;
  &lt;icon&gt;clock&lt;/icon&gt;
  &lt;category&gt;information&lt;/category&gt;
  &lt;description same_as="tooltip" /&gt;
  &lt;command executionmode="collect_output" &gt;uptime&lt;/command&gt;
  &lt;defaultshortcut&gt;Alt+Ctrl+U&lt;/defaultshortcut&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
    </para
></listitem>

    <listitem
><para
>Executa <command
>ls -l</command
> <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
 &lt;KrusaderUserActions&gt;
  &lt;action name="ls -l" &gt;
  &lt;title&gt;ls -l in current dir&lt;/title&gt;
  &lt;description same_as="tooltip" /&gt;
  &lt;command executionmode="collect_output" &gt;ls -l %aPath% %oPath%&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
    </para
></listitem>

    <listitem
><para
>Mostra el marcador de posició <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
 &lt;KrusaderUserActions&gt;
  &lt;action name="test_placeholder" &gt;
  &lt;title&gt;Echo Placeholder&lt;/title&gt;
  &lt;tooltip&gt;Echo's the placeholder values&lt;/tooltip&gt;
  &lt;category&gt;Testing&lt;/category&gt;
  &lt;description same_as="tooltip" /&gt;
  &lt;command executionmode="collect_output" onmultiplefiles="call_each" &gt;echo -e &quot;aPath %aPath()%  \naCurrent: %aCurrent()%&quot;&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
    </para
></listitem>

      <listitem
><para
>Aquesta acció d'usuari copia el camí i el nom del fitxer actual al porta-retalls: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="clipboard current" &gt;
  &lt;title&gt;Copy to Clipboard&lt;/title&gt;
  &lt;tooltip&gt;Copy to clipboard&lt;/tooltip&gt;
  &lt;icon&gt;klipper&lt;/icon&gt;
  &lt;category&gt;System&lt;/category&gt;
  &lt;description&gt;Copy current path and filename to clipboard&lt;/description&gt;
  &lt;command&gt;%_Clipboard(&quot;%aCurrent%&quot;)%&lt;/command&gt;
  &lt;defaultshortcut&gt;Win+C&lt;/defaultshortcut&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Selecciona un <literal role="extension"
>.diff</literal
> i un <literal role="extension"
>*.h</literal
> al plafó actiu: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="test_select" &gt;
  &lt;title&gt;Add selection *.diff and *.h&lt;/title&gt;
  &lt;category&gt;Selection&lt;/category&gt;
  &lt;command&gt;%aSelect(&quot;*.diff&quot;, &quot;add&quot;)% %aSelect(&quot;*.h&quot;, &quot;add&quot;)%&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Canvis al plafó actiu a <filename
>mnt/floppy</filename
> (adreça d'interès): <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
&lt;action name="mnt/floppy bookmark" &gt;
  &lt;title&gt;Jump to /mnt/floppy&lt;/title&gt;
  &lt;category&gt;Bookmarks&lt;/category&gt;
  &lt;command&gt;%aGoto(&quot;/mnt/floppy&quot;, &quot;yes&quot;)%&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Selecciona al plafó no actiu, tots els noms de fitxer que estan ressaltats al plafó actiu: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="asdfasdf" &gt;
  &lt;title&gt;Select in Other Panel&lt;/title&gt;
  &lt;category&gt;Selection&lt;/category&gt;
  &lt;description&gt;Select all filenames that are selected in the active panel, also in the non-active panel&lt;/description&gt;
  &lt;command&gt;%oSelect(&quot;%aList(&quot;selected&quot;, &quot; &quot;, &quot;Yes&quot;)%&quot;)%&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Fa una còpia de seguretat del fitxer/carpeta actual a <filename
>qualsevol.bak</filename
> a dins de la carpeta actual: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="backup current" &gt;
  &lt;title&gt;Backup in Current Directory&lt;/title&gt;
  &lt;tooltip&gt;Backup in current folder&lt;/tooltip&gt;
  &lt;icon&gt;document-save-as&lt;/icon&gt;
  &lt;category&gt;System&lt;/category&gt;
  &lt;description same_as="tooltip" /&gt;
  &lt;command&gt;%_Copy(&quot;%aCurrent%&quot;, &quot;%_Ask(&quot;new name&quot;, &quot;%aCurrent%.bak&quot;)%&quot;)%&lt;/command&gt;
  &lt;defaultshortcut&gt;Shift+F5&lt;/defaultshortcut&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Obre el <link linkend="krusearcher"
>KruSearcher</link
>: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="search" &gt;
  &lt;title&gt;Search Test&lt;/title&gt;
  &lt;command&gt;%_NewSearch(&quot;Search 2&quot;)%&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Estableix la imatge seleccionada com a fons de pantalla: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="set wallpaper" &gt;
  &lt;title&gt;Set as Wallpaper&lt;/title&gt;
  &lt;tooltip&gt;Set as wallpaper&lt;/tooltip&gt;
  &lt;icon&gt;image&lt;/icon&gt;
  &lt;category&gt;Service Menu&lt;/category&gt;
  &lt;description&gt;Set as wallpaper (scaled)&lt;/description&gt;
  &lt;command&gt;dcop kdesktop KBackgroundIface setWallpaper &quot;%aCurrent%&quot; 6&lt;/command&gt;
  &lt;defaultshortcut&gt;Win+W&lt;/defaultshortcut&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Aquesta acció d'usuari edita un fitxer amb permisos d'administrador emprant el <command
>kdesu</command
>: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="edit as root" &gt;
  &lt;title&gt;Edit as Root&lt;/title&gt;
  &lt;tooltip&gt;Edit as root&lt;/tooltip&gt;
  &lt;icon&gt;kwrite&lt;/icon&gt;
  &lt;category&gt;System&lt;/category&gt;
  &lt;description&gt;Edit a file with root permissions using kdesu&lt;/description&gt;
  &lt;command&gt;kdesu kwrite %aCurrent%&lt;/command&gt;
  &lt;defaultshortcut&gt;Win+F4&lt;/defaultshortcut&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Aquesta acció d'usuari afegeix el/s element/s a la llista de reproducció de l'Amarok: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="amarok enqueue" &gt;
  &lt;title&gt;Enqueue in Amarok&lt;/title&gt;
  &lt;tooltip&gt;Append selected item(s) to Amarok playlist&lt;/tooltip&gt;
  &lt;icon&gt;amarok&lt;/icon&gt;
  &lt;category&gt;Multimedia&lt;/category&gt;
  &lt;description same_as="tooltip" /&gt;
  &lt;command&gt;amarok --append %aList(&quot;Selected&quot;)%&lt;/command&gt;
  &lt;defaultshortcut&gt;Win+A&lt;/defaultshortcut&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

      <listitem
><para
>Obre el <link linkend="synchronizer"
>Sincronitzador</link
>: <programlisting
>&lt;!DOCTYPE KrusaderUserActions&gt;
&lt;KrusaderUserActions&gt;
 &lt;action name="synchronizer" &gt;
  &lt;title&gt;Synchronizer&lt;/title&gt;
  &lt;command&gt;%_Sync(&quot;Sync 2&quot;)%&lt;/command&gt;
 &lt;/action&gt;
&lt;/KrusaderUserActions&gt;</programlisting>
      </para
></listitem>

</itemizedlist>

</appendix>
