Closed Knogobert closed 1 year ago
I'd like to remap dd
to move to trash. As this is a safer way to do it.
Is there are already some cross-os packages for move to trash in Go?
it would be cool if there was a shortcut that would just let us call a command to the terminal directly so that whatever platform you are on you can use trash-cli or whatever relevant trash tool. It would also be a way to add very simple extensibility through scripting. Another use case could be using something to display images, like icat in kitty.
Hey @Knogobert, I hope you're doing well! Sorry for the delay, just noticed this issue but following up since it's related to some work I did a while back.
I attached my PR to this issue as a resolution since it turns out to meet the need expressed in the title. You'll be able to disable the delete action (there's an example in the PR that shows exactly how you could do that) or, alternatively, you could map the delete action to an entirely different key or key-combination that you're less likely to hit with frantic fingers.
As far as mapping the shortcut to send to trash instead of deleting, I think it'd be best to open that in another issue if it's something you'd still like to see. That way others could chime in on the discussion before starting an implementation or opening a PR.
@TheReptar Nice work! I think having a config for it will work good for many cases. This included. Thanks for putting in the effort. Will try it out after merge :)
No problem! In the meantime feel free to use my fork/branch, TheReptar/llama#add-configuration, if you want to play around with the feature. There's documentation in the README regarding the available key configurations.
I just tried this neat thing out but after 10 seconds of testing out, I.. Hahah, tapped
d
two times in hopes of searching for the folder starting on the letter D. An alert of a file being deleted with an undo came up, nice. Unfortunately my fidgety and quick fingerbrains ran a ctrl+c (cancel)...My file was deleted, not to be found in the trash :(
RIP "Invoices/Receipts" 2022-02-08. You will always be remembered here in this issue.
I'd love to continue using llama, but I'm afraid of this happening again with those fricken quick fingers acting on their own.
Is there any way we can either:
dd
shortcut to trash instead of deleting? Ordd
shortcut?Big love