Manjaro Difference between revisions of "PCmanFM-Qt"

Difference between revisions of "PCmanFM-Qt"

From Manjaro
imported>Dicktater
m (→‎CUSTOM ACTIONS FOR PCmanFM-Qt: removed redundant title)
(Marked this version for translation)
 
(20 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<p style="background-color:#ddddff">
<languages/>
<b>NOTE:</b> Taken from, and all credit goes to, <a href="http://madebits.com/blog/?x=entry:entry140317-141947;comments:1">MadeBits</a>. For more detailed examples and explanation see that web page and for a complete explanation of all the parameters see <a href="http://www.nautilus-actions.org/?q=node/377">DES-EMA</a>.
__TOC__
</p>
<translate>
=Overview= <!--T:1-->


Below actions are just examples. You can use them and create your owns based on them.
<!--T:2-->
PCManFM-Qt is the Qt port of PCManFM, the file manager of LXDE. It is the official file manager of lxqt but has few dependencies and can be used as a drop-in file manager on any Window Manager or Desktop Environment.


=Creating Custom Actions= <!--T:3-->
<!--T:4-->
Before creating the actions (which are desktop files), first create its directory/folder by copy-pasting the below command in terminal:
Before creating the actions (which are desktop files), first create its directory/folder by copy-pasting the below command in terminal:


<!--T:5-->
<pre>mkdir -p ~/.local/share/file-manager/actions</pre>
<pre>mkdir -p ~/.local/share/file-manager/actions</pre>
The last two directories in the above line have now been created recursively. You can as well create them one inside the other by file manager. If you prefer this method and can’t see the first hidden directory (.local) in your Home (~/) press <code>Ctrl+h</code> to make it (and all hidden files and directories) appear.
The last two directories in the above line have now been created recursively. You can as well create them one inside the other by file manager. If you prefer this method and can’t see the first hidden directory (<code>.local</code>) in your <code>Home</code> (<code>~/</code>) press <code>Ctrl+h</code> to make it (and all hidden files and directories) appear.
 


=== “Edit as root” custom action ===
<!--T:6-->
Below actions are just examples. You can use them and create your own actions based on them.


== “Edit as root” custom action == <!--T:7-->
<!--T:8-->
Create and edit the action file (rootedit.desktop) either by using file manager or by issuing these terminal commands one at a time (replace <code>juffed</code> with your text editor if it’s different):
Create and edit the action file (rootedit.desktop) either by using file manager or by issuing these terminal commands one at a time (replace <code>juffed</code> with your text editor if it’s different):


<!--T:9-->
<pre>touch ~/.local/share/file-manager/actions/rootedit.desktop
<pre>touch ~/.local/share/file-manager/actions/rootedit.desktop
juffed ~/.local/share/file-manager/actions/rootedit.desktop</pre>
juffed ~/.local/share/file-manager/actions/rootedit.desktop</pre>
Paste the below content in “rootedit.desktop”:


<pre>[Desktop Entry]
<!--T:10-->
Type=Action
Paste the below content in <code>rootedit.desktop</code>:
Name=Edit as Root
 
Icon=dialog-password
<!--T:11-->
Profiles=profile-zero;
[Desktop Entry]
Type=Action
Name=Edit as Root
Icon=dialog-password
Profiles=profile-zero;
[X-Action-Profile profile-zero]
Exec='''gksu''' '''juffed''' %f
Name=Default profile
 
<!--T:12-->
Replace <code>juffed</code> with your text editor if it’s different and replace <code>gksu</code> with <code>kdesu</code> if you use <code>kdesu</code>.


[X-Action-Profile profile-zero]
Exec=gksu juffed %f
Name=Default profile</pre>
Replace <code>juffed</code> with your text editor if it’s different and replace <code>gksu</code> with <code>kdesu</code> or <code>ssx</code> if you use one of them.


=== “Set as wallpaper” custom action ===
== “Set as wallpaper” custom action == <!--T:13-->


<!--T:14-->
Create and edit the action file (wallpaper.desktop) either by using file manager or by issuing these terminal commands one at a time (replace <code>juffed</code> with your text editor if it’s different):
Create and edit the action file (wallpaper.desktop) either by using file manager or by issuing these terminal commands one at a time (replace <code>juffed</code> with your text editor if it’s different):


<!--T:15-->
<pre>touch ~/.local/share/file-manager/actions/wallpaper.desktop
<pre>touch ~/.local/share/file-manager/actions/wallpaper.desktop
juffed ~/.local/share/file-manager/actions/wallpaper.desktop</pre>
juffed ~/.local/share/file-manager/actions/wallpaper.desktop</pre>
Paste the below content in “wallpaper.desktop”:


<!--T:16-->
Paste the below content in <code>wallpaper.desktop</code>:
<!--T:17-->
<pre>[Desktop Entry]
<pre>[Desktop Entry]
Type=Action
Type=Action
Line 43: Line 68:
Profiles=profile-zero;
Profiles=profile-zero;


<!--T:18-->
[X-Action-Profile profile-zero]
[X-Action-Profile profile-zero]
MimeTypes=image/*;
MimeTypes=image/*;
Line 48: Line 74:
Name[en]=Default profile
Name[en]=Default profile
SelectionCount==1</pre>
SelectionCount==1</pre>
== “Compress” custom action == <!--T:19-->
<!--T:20-->
If you don't have one of those archive applications listed in pcmanfm-qt's Preferences>Advanced, you can use a commandline archive utility like <code>atool</code> with custom actions. First install <code>atool</code> from the repo:
<!--T:21-->
sudo pacman -S atool
<!--T:22-->
Create and edit the action file (compress.desktop) either by using file manager or by issuing these terminal commands one at a time (replace <code>juffed</code> with your text editor if it’s different):
<!--T:23-->
<pre>touch ~/.local/share/file-manager/actions/compress.desktop
juffed ~/.local/share/file-manager/actions/compress.desktop</pre>
<!--T:24-->
Paste the below content in <code>compress.desktop</code>:
<!--T:25-->
<pre>[Desktop Entry]
Type=Action
Name[en]=Compress
Icon=application-x-compressed-tar
Profiles=profile-zero;
<!--T:26-->
[X-Action-Profile profile-zero]
MimeTypes=all/all;
Exec=apack %d/%n.tar.gz %F
Name[en]=Default profile
SelectionCount==1</pre>
<!--T:27-->
This will create a YOUR_USERNAME.tar.gz archive from the selected files/folders in the current directory. (You may need to change the icon in the above code if you don't have oxygen icons.)
== “Extract” custom action == <!--T:28-->
<!--T:29-->
If you don't have one of those archive applications listed in pcmanfm-qt's Preferences>Advanced, you can use a commandline archive utility like <code>atool</code> with custom actions. First install <code>atool</code> from the repo:
<!--T:30-->
sudo pacman -S atool
<!--T:31-->
Create and edit the action file (extract.desktop) either by using file manager or by issuing these terminal commands one at a time (replace <code>juffed</code> with your text editor if it’s different):
<!--T:32-->
<pre>touch ~/.local/share/file-manager/actions/extract.desktop
juffed ~/.local/share/file-manager/actions/extract.desktop</pre>
<!--T:33-->
Paste the below content in <code>extract.desktop</code>:
<!--T:34-->
<pre>[Desktop Entry]
Type=Action
Name[en]=Extract
Icon=package-x-generic
Profiles=profile-zero;
<!--T:35-->
[X-Action-Profile profile-zero]
MimeTypes=application/x-7z-compressed;application/x-7z-compressed-tar;application/x-ace;application/x-alz;application/x-ar;application/x-arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cbr;application/x-cbz;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/x-deb;application/x-ear;application/x-ms-dos-executable;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-java-archive;application/x-lha;application/x-lhz;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-rzip;application/x-tar;application/x-tarz;application/x-stuffit;application/x-war;application/x-xz;application/x-xz-compressed-tar;application/x-zip;application/x-zip-compressed;application/x-zoo;application/zip;multipart/x-zip;
Exec=atool --extract-to=%d %f
Name[en]=Default profile
SelectionCount==1</pre>
<!--T:36-->
This will uncompress the selected archive into the current directory. (You may need to change the icon in the above code if you don't have oxygen icons.)
=See also= <!--T:37-->
<!--T:38-->
You can find more pages about LXQt in the Manjaro Wiki [https://wiki.manjaro.org/index.php?title=Desktop_Environments#LXQt here].
</translate>
[[Category:Contents Page{{#translation:}}]]

Latest revision as of 18:20, 7 September 2021

Other languages:
English • ‎русский

Overview

PCManFM-Qt is the Qt port of PCManFM, the file manager of LXDE. It is the official file manager of lxqt but has few dependencies and can be used as a drop-in file manager on any Window Manager or Desktop Environment.


Creating Custom Actions

Before creating the actions (which are desktop files), first create its directory/folder by copy-pasting the below command in terminal:

mkdir -p ~/.local/share/file-manager/actions

The last two directories in the above line have now been created recursively. You can as well create them one inside the other by file manager. If you prefer this method and can’t see the first hidden directory (.local) in your Home (~/) press Ctrl+h to make it (and all hidden files and directories) appear.


Below actions are just examples. You can use them and create your own actions based on them.


“Edit as root” custom action

Create and edit the action file (rootedit.desktop) either by using file manager or by issuing these terminal commands one at a time (replace juffed with your text editor if it’s different):

touch ~/.local/share/file-manager/actions/rootedit.desktop
juffed ~/.local/share/file-manager/actions/rootedit.desktop

Paste the below content in rootedit.desktop:

[Desktop Entry]
Type=Action
Name=Edit as Root
Icon=dialog-password
Profiles=profile-zero;

[X-Action-Profile profile-zero]
Exec=gksu juffed %f
Name=Default profile

Replace juffed with your text editor if it’s different and replace gksu with kdesu if you use kdesu.


“Set as wallpaper” custom action

Create and edit the action file (wallpaper.desktop) either by using file manager or by issuing these terminal commands one at a time (replace juffed with your text editor if it’s different):

touch ~/.local/share/file-manager/actions/wallpaper.desktop
juffed ~/.local/share/file-manager/actions/wallpaper.desktop

Paste the below content in wallpaper.desktop:

[Desktop Entry]
Type=Action
Name[en]=Set As Wallpaper
Icon=user-desktop
Profiles=profile-zero;

[X-Action-Profile profile-zero]
MimeTypes=image/*;
Exec=pcmanfm-qt -w %f
Name[en]=Default profile
SelectionCount==1


“Compress” custom action

If you don't have one of those archive applications listed in pcmanfm-qt's Preferences>Advanced, you can use a commandline archive utility like atool with custom actions. First install atool from the repo:

sudo pacman -S atool

Create and edit the action file (compress.desktop) either by using file manager or by issuing these terminal commands one at a time (replace juffed with your text editor if it’s different):

touch ~/.local/share/file-manager/actions/compress.desktop
juffed ~/.local/share/file-manager/actions/compress.desktop

Paste the below content in compress.desktop:

[Desktop Entry]
Type=Action
Name[en]=Compress
Icon=application-x-compressed-tar
Profiles=profile-zero;

[X-Action-Profile profile-zero]
MimeTypes=all/all;
Exec=apack %d/%n.tar.gz %F
Name[en]=Default profile
SelectionCount==1

This will create a YOUR_USERNAME.tar.gz archive from the selected files/folders in the current directory. (You may need to change the icon in the above code if you don't have oxygen icons.)


“Extract” custom action

If you don't have one of those archive applications listed in pcmanfm-qt's Preferences>Advanced, you can use a commandline archive utility like atool with custom actions. First install atool from the repo:

sudo pacman -S atool

Create and edit the action file (extract.desktop) either by using file manager or by issuing these terminal commands one at a time (replace juffed with your text editor if it’s different):

touch ~/.local/share/file-manager/actions/extract.desktop
juffed ~/.local/share/file-manager/actions/extract.desktop

Paste the below content in extract.desktop:

[Desktop Entry]
Type=Action
Name[en]=Extract
Icon=package-x-generic
Profiles=profile-zero;

[X-Action-Profile profile-zero]
MimeTypes=application/x-7z-compressed;application/x-7z-compressed-tar;application/x-ace;application/x-alz;application/x-ar;application/x-arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cbr;application/x-cbz;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/x-deb;application/x-ear;application/x-ms-dos-executable;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-java-archive;application/x-lha;application/x-lhz;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-rzip;application/x-tar;application/x-tarz;application/x-stuffit;application/x-war;application/x-xz;application/x-xz-compressed-tar;application/x-zip;application/x-zip-compressed;application/x-zoo;application/zip;multipart/x-zip;
Exec=atool --extract-to=%d %f
Name[en]=Default profile
SelectionCount==1

This will uncompress the selected archive into the current directory. (You may need to change the icon in the above code if you don't have oxygen icons.)


See also

You can find more pages about LXQt in the Manjaro Wiki here.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.