<!-- **********************************************************************
  copyright            : (C) 2000-2019
                         Rafi Yanai, Shie Erlich, Frank Schoolmeesters
                         & the Krusader Krew
  e-mail               : krusader-devel@googlegroups.com
  web site             : https://krusader.org
  description          : a Krusader Documentation File

***************************************************************************
* Permission is granted to copy, distribute and/or modify this            *
* document under the terms of the GNU Free Documentation License,         *
* Version 1.1 or any later version published by the Free Software         *
* Foundation; with no Invariant Sections, no Front-Cover Texts and        *
* no Back-Cover Texts.  A copy of the license is available on the         *
* GNU site https://www.gnu.org/licenses/fdl.html or by writing to:        *
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,    *
* MA 02111-1307, USA.                                                     *
*********************************************************************** -->
<appendix id="useraction-xml">
  <title
>useractions.xml</title>
  <para
>In questa appendice verranno forniti alcuni esempi di file <filename
>useractions.xml</filename
>, grazie ai quali potrai iniziare a scoprire la potenza del <link linkend="useractions"
>Menu utente</link
> e imparare a usarlo. Una volta capito come scrivere nuove voci del Menu utente, scoprirai che &krusader; è uno strumento ancora più potente e personalizzabile.</para>
  <para
>Può valere la pena di caricare il tuo Menu Utente su <ulink url="https://store.kde.org"
>store.kde.org</ulink
>, poiché li stiamo raccogliendo. Se selezioneremo il tuo file, esso verrà incluso in &krusader; nel prossimo rilascio.</para>

<itemizedlist>
    <listitem
><para
>Esegue <command
>uptime</command
> <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
 &lt;KrusaderUserActions>
  &lt;action name="uptime" >
  &lt;title
>Uptime&lt;/title>
  &lt;tooltip
>visualizza il tempo trascorso dall'avvio del computer&lt;/tooltip>
  &lt;icon
>clock&lt;/icon>
  &lt;category
>Informazioni&lt;/category>
  &lt;description same_as="tooltip" />
  &lt;command executionmode="collect_output" 
>uptime&lt;/command>
  &lt;defaultshortcut
>Alt+Ctrl+U&lt;/defaultshortcut>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
    </para
></listitem>

    <listitem
><para
>Esegue <command
>ls -l</command
> <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
 &lt;KrusaderUserActions>
  &lt;action name="ls -l" >
  &lt;title
>Esegui ls -l nella cartella attuale&lt;/title>
  &lt;description same_as="tooltip" />
  &lt;command executionmode="collect_output" 
>ls -l %aPath% %oPath%&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
    </para
></listitem>

    <listitem
><para
>Visualizza segnaposto <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
 &lt;KrusaderUserActions>
  &lt;action name="test_placeholder" >
  &lt;title
>Visualizza segnaposto&lt;/title>
  &lt;tooltip
>Visualizza i valori del segnaposto&lt;/tooltip>
  &lt;category
>Verifica&lt;/category>
  &lt;description same_as="tooltip" />
  &lt;command executionmode="collect_output" onmultiplefiles="call_each" 
>echo -e &quot;Percorso: %aPath()%  \nFile: %aCurrent()%&quot;&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
    </para
></listitem>

      <listitem
><para
>La seguente voce copierà il percorso attuale e il nome del file selezionato negli appunti: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="clipboard current" >
  &lt;title
>Copia negli appunti&lt;/title>
  &lt;tooltip
>Copia negli appunti&lt;/tooltip>
  &lt;icon
>klipper&lt;/icon>
  &lt;category
>System&lt;/category>
  &lt;description
>Copia il nome del file e il percorso attuale negli appunti&lt;/description>
  &lt;command
>%_Clipboard(&quot;%aCurrent%&quot;)%&lt;/command>
  &lt;defaultshortcut
>Win+C&lt;/defaultshortcut>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Seleziona i file <literal role="extension"
>.diff</literal
> e <literal role="extension"
>.h</literal
> nel pannello attivo: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="test_select" >
  &lt;title
>Seleziona i file *.diff e *.h&lt;/title>
  &lt;category
>Selezione&lt;/category>
  &lt;command
>%aSelect(&quot;*.diff&quot;, &quot;add&quot;)% %aSelect(&quot;*.h&quot;, &quot;add&quot;)%&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Sposta il pannello attivo su <filename
>mnt/floppy</filename
> (segnalibro): <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name=" mnt/floppy bookmark" >
  &lt;title
>Vai a /mnt/floppy&lt;/title>
  &lt;category
>Segnalibri&lt;/category>
  &lt;command
>%aGoto(&quot;/mnt/floppy&quot;, &quot;yes&quot;)%&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Seleziona nel pannello inattivo tutti i nomi file evidenziati nel pannello attivo: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
 &lt;KrusaderUserActions>
  &lt;action name="asdfasdf" >
   &lt;title
>Seleziona nell'altro pannello&lt;/title>
   &lt;category
>Selezione&lt;/category>
   &lt;description
>Seleziona anche nel pannello inattivo tutti i file selezionati nel pannello attivo&lt;/description>
   &lt;command
>%oSelect(&quot;%aList(&quot;selected&quot;, &quot; &quot;, &quot;Yes&quot;)%&quot;)%&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions</programlisting>
      </para
></listitem>

      <listitem
><para
>Crea una copia di sicurezza della cartella o del file attuale in <filename
> pippo.bak</filename
> nella cartella corrente: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="backup current" >
  &lt;title
>Copia di sicurezza nella cartella attuale&lt;/title>
  &lt;tooltip
>Copia di sicurezza nella cartella attuale&lt;/tooltip>
  &lt;icon
>document-save-as&lt;/icon>
  &lt;category
>System&lt;/category>
  &lt;description same_as="tooltip" />
  &lt;command
>%_Copy(&quot;%aCurrent%&quot;, &quot;%_Ask(&quot;Nuovo nome&quot;, &quot;%aCurrent%.bak&quot;)%&quot;)%&lt;/command>
  &lt;defaultshortcut
>Shift+F5&lt;/defaultshortcut>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Apre <link linkend="krusearcher"
>KruSearcher</link
>: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="search" >
  &lt;title
>Ricerca di prova&lt;/title>
  &lt;command
>%_NewSearch(&quot;Search 2&quot;)%&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Imposta come sfondo l'immagine selezionata: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="set wallpaper" >
  &lt;title
>Imposta come sfondo&lt;/title>
  &lt;tooltip
>Imposta come sfondo&lt;/tooltip>
  &lt;icon
>image&lt;/icon>
  &lt;category
>Menu di servizio&lt;/category>
  &lt;description
>Imposta come sfondo (scalato)&lt;/description>
  &lt;command
>dcop kdesktop KBackgroundIface setWallpaper &quot;%aCurrent%&quot; 6&lt;/command>
  &lt;defaultshortcut
>Win+W&lt;/defaultshortcut>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Questa voce del menu utente permette di modificare un file con i permessi di root appoggiandosi a <command
>kdesu</command
>: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="edit as root" >
  &lt;title
>Modifica come root&lt;/title>
  &lt;tooltip
>Modifica come root&lt;/tooltip>
  &lt;icon
>kwrite&lt;/icon>
  &lt;category
>System&lt;/category>
  &lt;description
>Modifica un file con i permessi di root attraverso kdesu&lt;/description>
  &lt;command
>kdesu kwrite %aCurrent%&lt;/command>
  &lt;defaultshortcut
>Win+F4&lt;/defaultshortcut>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Questa voce del menu utente aggiunge l'elemento o gli elementi selezionati alla playlist di Amarok: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="amarok enqueue" >
  &lt;title
>Aggiungi alla playlist (Amarok)&lt;/title>
  &lt;tooltip
>Aggiungi gli elementi selezionati alla playlist di Amarok&lt;/tooltip>
  &lt;icon
>amarok&lt;/icon>
  &lt;category
>Multimedia&lt;/category>
  &lt;description same_as="tooltip" />
  &lt;command
>amarok --append %aList(&quot;Selected&quot;)%&lt;/command>
  &lt;defaultshortcut
>Win+A&lt;/defaultshortcut>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

      <listitem
><para
>Apre la <link linkend="synchronizer"
>sincronizzazione</link
>: <programlisting
>&lt;!DOCTYPE KrusaderUserActions>
&lt;KrusaderUserActions>
 &lt;action name="synchronizer" >
  &lt;title
>Sincronizzatore&lt;/title>
  &lt;command
>%_Sync(&quot;Sync 2&quot;)%&lt;/command>
 &lt;/action>
&lt;/KrusaderUserActions
></programlisting>
      </para
></listitem>

</itemizedlist>

</appendix>
