1. 18 Best Pcmanfm Actions

Pcmanfm & Openbox Guide

[Desktop Entry]
Type=Action
ToolbarLabel=Checksum
Name=Checksum
Profiles=profile-zero;
Icon=

[X-Action-Profile profile-zero]
Exec=/opt/madebits-pca_1.0.0/checksum.sh %f
Name=Checksum
SelectionCount==1

mb-checksum.desktop

Pcmanfm Actions
[Desktop Entry]
Type=Menu
Icon=forward
Name=Custom Actions
ItemsList=mb-backup-here;mb-checksum;mb-compress;mb-copy-to-folder;mb-create-desktop-shortcut;mb-editor-root;mb-make-file-executable;mb-make-me-file-owner;mb-make-new-directory;mb-make-new-file;mb-move-to-folder;mb-open-as-root;mb-play-audio-randomly;mb-prm;mb-rename-root;mb-send-to-root-trash;mb-set-as-wallpaper;mb-slideshow;

mb-menu.desktop
Pcmanfm can be configured to allow just about anything to be listed in the pop-up box that appears when right clicking a file or folder, the so-called file browser right-click or actions menu. The starter and key for pcmanfm actions is madebits-pca_1.0.0-1.deb, which was released in 2015. It adds 8 actions to the pcmanfm action menu. You can download madebits-pca_1.0.0-1.deb from the github link given above or from this website:   curl -O http://lxlinux.com/madebits-pca_1.0.0-1.deb. Details for configuring these actions are in Pcmanfm & Openbox Guide.

More important than the actions themselves, is that the madebits program shows a general procedure for putting actions into pcmanfm. The madebits program comprises 3 steps for creating an action:

On the upper right are mb-menu.desktop showing all 18 actions, and the corresponding pcmanfm custom actions menu open on a file that generates 16 of these actions. On the upper-left is the action desktop file for the checksum action, which can be taken as a prototype for each of the new actions we will list here. All the user needs to do for each action desktop is edit mb-checksum.desktop to the correct name, chosen icon and the "Exec" of the action.

ActionExecScript Source
backup heregksudo /opt/madebits-pca_1.0.0/backupfilehere.sh %fFrom Madebits
checksum/opt/madebits-pca_1.0.0/checksum.sh %fDownload here; See below
compressapack %d/%n.tar.gz %fInstall atools
copy-to-foldergksudo /opt/madebits-pca_1.0.0/copy2folder.sh %fFrom Madebits
create desktop shortcut/opt/madebits-pca_1.0.0/link.sh %fSee below; only for idesk
edit-text-as-rootgksudo leafpad %fFor leafpad
make file executablegksudo chmod +x %f
make me file ownergksudo chown me %f"me"="user-name"
make new directorygksudo /opt/madebits-pca_1.0.0/newdir.sh %fSee below
make new filegksudo /opt/madebits-pca_1.0.0/newfile.sh %fSee below
move to foldergksudo /opt/madebits-pca_1.0.0/move2folder.sh %fSee below
open as rootgksudo pcmanfm %u
play audio randomlyvlc -Z %fFor vlc
permissionsgksudo /opt/madebits-pca_1.0.0/prm %fSee below; Install xdotool
rename-rootgksudo /opt/madebits-pca_1.0.0/newname.sh %fSee below
send to root-trashgksudo trash %f
set as wallpaper/usr/bin/pcmanfm -w %fFor pcmanfm
slideshowmirage --fullscreen --slideshow %fFor mirage


General software requirements for the above actions are Core Utils and zenity. The action desktop file for Checksum, which shows the MD5, SHA-1, SHA-256 and SHA-512 sums, when applied to a file, can be created by copying and pasting from the box on the upper left. The exec script, checksum.sh, was created by Misko_2083 and can be downloaded from this website:  curl -O http://lxlinux.com/checksum.sh.

#!/bin/bash
bash -c 'leafpad ~/.idesktop/template.lnk;$SHELL'
exit0

link.sh
#!/bin/bash
NEWDIR=$(zenity --entry --title="Directory Name" --text="include path")
    mkdir -p --mode=755 $NEWDIR
exit0

newdir.sh

#!/bin/bash
xdotool key F4 &
sleep 2
xdotool type "stat -c '%a - %n' *" &
sleep 1
xdotool key "Return" &
exit0

prm
#!/bin/bash
folder=$(zenity --file-selection --directory --title="Move To Folder")
if [[ $folder ]]; then
    # mv -n $@ "$folder"
    for var in "$@"
        do
    mv -n "$var" "$folder"
    done
exit0

move2folder.sh

#!/bin/bash
NEWFILE=$(zenity --entry --title="File Name" --text="include path")
    touch $NEWFILE
exit0

newfile.sh
#!/bin/bash
OLDNAME=$(zenity --entry --title="Old Name" --text="include path")
NEWNAME=$(zenity --entry --title="New Name" --text="include path")
    mv -n "$OLDNAME" "$NEWNAME"
exit0

newname.sh