If you want to use trash (recycle bin for Windows dropouts) with ranger, here is the easiest way to set it up:
Add trash support:
apt-get install trash-cli
Make these changes to the ranger conf file: ~/.config/ranger/rc.conf . This will use trash-cli and disable the internal delete commands:
Comment out:
# map <F8> console delete # Original setting before trash support
Add:
map <F8> shell -w echo "Use DD to delete files. It uses trash-cli."
Comment out:
# map <DELETE> console delete # Original setting before trash support
Add:
map <DELETE> shell -w echo "Use DD to delete files. It uses trash-cli."
Add this command to use trash-cli:
map DD shell -p trash -v %s 2>&1
[SOLVED] How to use trash with ranger file manager
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 4
- Posts: 250
- Joined: Sat Apr 04, 2015 8:55 pm
[SOLVED] How to use trash with ranger file manager
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 4
- Posts: 250
- Joined: Sat Apr 04, 2015 8:55 pm
Re: [SOLVED] How to use trash with ranger file manager
The good thing about using trash-cli is that it moves the file(s) to the trash directory of the same device, so there is no big read/write operation when a file is moved.