https://github.com/sayanarijit/trash-cli.xplr
trach-cli integration for xplr
https://github.com/sayanarijit/trash-cli.xplr
Last synced: 7 months ago
JSON representation
trach-cli integration for xplr
- Host: GitHub
- URL: https://github.com/sayanarijit/trash-cli.xplr
- Owner: sayanarijit
- License: mit
- Created: 2021-06-28T04:16:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-31T03:21:17.000Z (about 2 years ago)
- Last Synced: 2025-03-19T06:04:10.692Z (7 months ago)
- Language: Lua
- Homepage: https://xplr.dev
- Size: 20.5 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trash-cli.xplr
Trash files and directories using
[trash-cli](https://github.com/andreafrancia/trash-cli).[](https://gifyu.com/image/Ah1L)
## Requirements
- [trash-cli](https://github.com/andreafrancia/trash-cli)
- [fzf](https://github.com/junegunn/fzf) (for restoring)## Installation
### Install manually
- Add the following line in `~/.config/xplr/init.lua`
```lua
local home = os.getenv("HOME")
package.path = home
.. "/.config/xplr/plugins/?/init.lua;"
.. home
.. "/.config/xplr/plugins/?.lua;"
.. package.path
```- Clone the plugin
```bash
mkdir -p ~/.config/xplr/pluginsgit clone https://github.com/sayanarijit/trash-cli.xplr ~/.config/xplr/plugins/trash-cli
```- Require the module in `~/.config/xplr/init.lua`
```lua
require("trash-cli").setup()-- Or
require("trash-cli").setup{
-- Trash file(s)
trash_bin = "trash-put",
trash_mode = "delete",
trash_key = "d",-- Empty trash
empty_bin = "trash-empty",
empty_mode = "delete",
empty_key = "E",-- Interactive selector
trash_list_bin = "trash-list",
trash_list_selector = "fzf -m | cut -d' ' -f3-",-- Restore file(s)
restore_bin = "trash-restore",-- Restore files deleted from $PWD only
restore_mode = "delete",
restore_key = "r",-- Restore files deleted globally
global_restore_mode = "delete",
global_restore_key = "R",
}-- Type `dd` to trash, `dr` or `dR` to restore, and `dE` to empty trash.
```## Features
- Restore multiple files at once using fzf multi select.