How do I convince spaceFM to send files to the trash bin when I hit DELETE? Right now the files are immediately lost no matter if I use DEL or SHIFT+DEL.
I'd like the files to be moved to trash when deleted. But SpaceFM, as I see, doesn't offer this option. So I have created a custom command in the right menu as follow.
- Right click for any files. Then right click on any item of the right menu.
- A new menu will appear. Click "New > Command"
- A new window will appear asking a name for new command. I entered "Move to Trash" and pressed OK
A new window appeared asking for the custom command. I entered the following command:
zenity --list --width=400 --height=150 --title='Confirmation' --text='Are you sure you want to move the following files to trash?' --column='Path' %F; (( $? == 0 )) && trash %F
By the way I wanted to hide the built-in "Delete" option from the right context menu. I couldn't remove the built-in command. But in the properties of the menu item, I found "Context" tab which is offers rules when to appear and when disappear. I created a new rule something like "show" when "filename ends with .xyz". So the built-in "Delete" commands start to appear only on ".xyz" files. :)
Hope it helps.
Original post: https://mim.mbirgin.com/?c=posts&id=103
I made so:
I created a Bookmark to the Trash /home/ste/.local/share/Trash/files (and choose the "Trash" icon for it).
On the Bookmark side-panel I created (Right Click → New → Command) a command named "Empty Trash" with command
zenity --question --text="Are you sure you want to empty Trash %F?" && rm -rf ~/.local/share/Trash/* %F
I've taken away the shortcut for "Delete" option: Right Click on a item → Right Click on "Delete" → Properties → Key → Unset
I've hidden the "Delete" option: Right Click on a item → Right Click on "Delete" → Properties → Context → show if... I've added a new "impossible" rule (Filename → contains "sdiofbhvnklsdhfvossdö" oe something like this!)
I've created a new option in the item menu for moving to trash: Right Click on a item → Right Click on something on the apeeared menu → New → Command → now a new command named "Delete" and then a shortkey (→ Key Delete) and then an icon (→ choose → Trash icon!) and then → Command →
Now I've the same system as in Thunar or something like this.