Widnows and (L)ubuntu move files to the bin if we delete them (either via the right-click mouse menu or pressing DEL on keyboard), but Easy removes items permanently, so what is the reason for thrash on desktop? Is there a keyboard shortcut to move files to trash? Doing this manually is a bit of waste of time to minimize all the windows and then drag items to trash. Keyboard shortcut would be helpful - is there any?
Keyboard shortcut for EasyOS trash?
Moderator: BarryK
Keyboard shortcut for EasyOS trash?
Running live-USB EasyOS-64_6.3.1
...and taxes are theft! -.-
https://321my.wordpress.com/pw/
Re: Easy trash
The trash mechanism in Easy is inherited from Puppy Linux. It was first created in 2005, worked on by many people, I did a couple of changes in 2013.
If you want keyboard shortcuts, you will have to figure out how. The code is at /usr/local/apps/Trash
Looking at the developer names, I don't think any of them are with us now.
-
- Posts: 490
- Joined: Sun Oct 02, 2022 6:25 pm
- Location: France
- Has thanked: 102 times
- Been thanked: 84 times
Re: Easy trash
We can add an entry in the right click menu to send to trash. But this must be done for each necessary MIME-type.
(When the RoX-Filer options are default) A rigth-click on a file or a folder opens simultaneously 2 menus.
In the right menu, the first line ("Personnaliser le menu" in French - probably "Customize the menu" in English) opens a subdirectory of /root/.config/rox.sourceforge.net/SendTo (depending of the MIME-type of the file,, for example the subdirectory .text_plain for a simple text, or .inode_directory for a folder)
We create a symbolic link to the Trash after dragging the trash icon to the new window. We close the window.
The option trash was added to the (right) menu above the "customize menu " line. (But only for the files with the used MIME-type)
Remarks :
In tne right click menu, there is a line Options that opens theoptions of ROX-Filer.
In the Menus section (scrrenshot in French):
we can simplify the right-click menu by ticking a box (In the screenshot : Menu 'Fichier' par clic droit)
NB : the line Options disappears in the menu but remains accessible by right-clicking on an icon on the desktop.
Theorically, we can add a keyboard shortcut for the action of sending to trash. The Button "Définir les raccourcis clavier" on the screenshot gives instructions :
but I did not succeed.
NB2 : The addiion of keyboard shortcut works on the distribution AntiX (jwm+Rox), but AntiX don't have trashcan. (Edit :the addition of shortcuts to a default command like Rename works also in EasyOS)
Re: Easy trash
I can add the short cut.
but this seems fairly useless for single files. This is because I can't find a way of highlighting a file by using the keyboard. You can move an outline around a window using the arrow keys, but the only key that takes effect is 'enter'. which opens the file. Therefore you have to right click anyway.
I never use trash myself, and much prefer a proper 'delete'. I want to test if files are safe to remove, I either rename them, or move them to a temporary directory (which is all 'Trash' is, but at least there won't be anything else there).
- Attachments
-
- Screenshot(2).png (22.47 KiB) Viewed 691 times
-
- Posts: 490
- Joined: Sun Oct 02, 2022 6:25 pm
- Location: France
- Has thanked: 102 times
- Been thanked: 84 times
Re: Easy trash
@Keef,
In a ROX-Filer window,when we type a keyboard shortcut associated with one of the lines Copy, Delete, Properties or Find, the mouse cursor turns into a cross.
Then if we click on a file in the window, the action (associated to the keyboard shortcut) is performed (Same with a folder)
In my test i have added a shortcut to the trash command. The shortcut is visible in the menu, but it has no effect (unlike Ctrl+P, Ctrl+X... the default shortcuts
(Remark : If we change the shortcuts for Copy,etc the new work. If we associate Ctrl+P (or Ctrl+X,etc) to a non default command, it don't work)
NB : The Trash is not only a directory, it's an application able to restore files to their original place
(Sorry for my English)
Re: Easy trash
Keef wrote: Thu Jun 08, 2023 5:28 pmI can add the short cut, but this seems fairly useless for single files. This is because I can't find a way of highlighting a file by using the keyboard.
For me highlighting the file using CTRL + left mouse click is good enough, so how did you add the Send to TRASH
shortcut to the right click menu? I know how to change a shortcut, e.g. I swapped CRTL+X for DEL to delete files, but I have no idea how to add Send to TRASH
.
Running live-USB EasyOS-64_6.3.1
...and taxes are theft! -.-
https://321my.wordpress.com/pw/
Re: Easy trash
Caramel wrote: Thu Jun 08, 2023 1:14 pmWe can add an entry in the right click menu to send to trash. But this must be done for each necessary MIME-type.
(When the RoX-Filer options are default) A rigth-click on a file or a folder opens simultaneously 2 menus.
In the right menu, the first line ("Personnaliser le menu" in French - probably "Customize the menu" in English) opens a subdirectory of /root/.config/rox.sourceforge.net/SendTo (depending of the MIME-type of the file,, for example the subdirectory .text_plain for a simple text, or .inode_directory for a folder)
We create a symbolic link to the Trash after dragging the trash icon to the new window. We close the window.
The option trash was added to the (right) menu above the "customize menu " line. (But only for the files with the used MIME-type)
A lot of hassle then... Thanks
Running live-USB EasyOS-64_6.3.1
...and taxes are theft! -.-
https://321my.wordpress.com/pw/
Re: Keyboard shortcut for EasyOS trash?
Keef wrote: Fri Jun 09, 2023 6:05 pm@szept
See Caramel's explanation above. As the post mentions, it must be done for each MIME-type, which can be tedious.
If you look in /etc/xdg/rox.sourceforge.net/OpenWith, show hidden folders and you will see these:
.audio
.image
.text
You can add more of these generic mime-handlers, say:
.application
.video
and in them put symlinks to whatever app you want to run. It will appear in the right-click "Open with..." menu of a file.
Note, /etc/xdg/rox.sourceforge.net/OpenWith does get erased. For example when install a package via PKGget. See this:
/usr/sbin/build-rox-sendto -- this is where can add the required app, see the big case-statement.
Re: Keyboard shortcut for EasyOS trash?
OK, have implemented a solution, based on the mechanism described in previous post. It is due to how 'build-rox-sendto' works. I created /usr/share/applications/trash.desktop:
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Trash bin
Icon=trashcan_full48.png
Comment=Look in the trash bin
Exec=/usr/local/apps/Trash/AppRun
Terminal=false
Type=Application
Categories=Utility;
GenericName=Trash
NoDisplay=false
MimeType=inode;audio;text;video;application;image
Then ran build-rox-sendto, now right-click on any file, the "Open With..." has "Trash" entry.
Not quite as good as having "Trash" at the top-level of the menu.
Hmmm, will have to take out "inode". That causes the "Trash" for folders, and the folder does get deleted, but it isn't in the trashcan. It seems to be a limitation of the trashcan code.
Someone will have to study /usr/local/apps/Trash and fix it for folders.
Re: Keyboard shortcut for EasyOS trash?
Note, I don't see the point of a right-click trash menu entry, as it is so simple just to drag a file to the trash icon.
It is easy enough to be aware that delete a file is permanent, drag to trashcan it can be recovered.
It just needs to be fixed for folders.
EDIT:
Correction, moving folders to the trashcan does work.
I've tidied up the code a bit. It is supposed to bark when a file/folder is dragged to trash, or trash emptied. Fixed.
- MochiMoppel
- Posts: 1249
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 22 times
- Been thanked: 448 times
Keyboard shortcut for Trash?
BarryK wrote: Sat Jun 10, 2023 2:16 amNote, I don't see the point of a right-click trash menu entry,
I don't even see the point of trash
The point of deleting is to get rid of unneeded files and free up disk space. Trash does the opposite: It keeps the files and increases the required disk space.
it is so simple just to drag a file to the trash icon.
Not so simple with my trackball. It's easy to lose the bunch of dragged files on its way - with unpredictable consequences. And then the Trash icon has to be visible and not buried under a window.
The request was for a keyboard shortcut ...
Re: Keyboard shortcut for EasyOS trash?
BarryK wrote: Sat Jun 10, 2023 2:16 amNote, I don't see the point of a right-click trash menu entry, as it is so simple just to drag a file to the trash icon.
It's easy, but if you have 10+ windows opened and you have to minimize all of them to see desktop and drag files/folders to trash.
MochiMoppel wrote: Sat Jun 10, 2023 2:52 amI don't even see the point of trash
The point of deleting is to get rid of unneeded files and free up disk space. Trash does the opposite: It keeps the files and increases the required disk space.
Well, I used to think the same, but learning from my mistakes (when I deleted too many files too quickly!!!) I prefer to move files to trash and delete them permamenty after a while (2-3 months), when I'm much more certain I really don't need them
Running live-USB EasyOS-64_6.3.1
...and taxes are theft! -.-
https://321my.wordpress.com/pw/