PCmanFM-Qt

Revision as of 05:09, 2 March 2023 by Krotesk (talk | contribs) (Created page with "Приведенные ниже действия являются лишь примерами. Вы можете использовать их и создавать на их...")
Other languages:
English • ‎русский

Обзор

PCManFM-Qt - это Qt-порт PCManFM, файлового менеджера LXDE. Он является официальным файловым менеджером lxqt, но имеет мало зависимостей и может быть использован в качестве встроенного файлового менеджера в любом оконном менеджере или среде рабочего стола.


Создание пользовательских действий

Прежде чем создавать действия (которые являются файлами рабочего стола), сначала создайте их каталог/папку, скопировав приведенную ниже команду в терминале:

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

Последние два каталога в приведенной выше строке теперь были созданы рекурсивно. Вы также можете создавать их один внутри другого с помощью файлового менеджера. Если вы предпочитаете этот метод и не видите первый скрытый каталог (.local) в Home (~/), нажмите Ctrl+h, чтобы он (и все скрытые файлы и каталоги) появился.


Приведенные ниже действия являются лишь примерами. Вы можете использовать их и создавать на их основе свои собственные действия.


“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.)


Смотрете также

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