All Projects → rushsteve1 → trash-d

rushsteve1 / trash-d

Licence: MIT license
A near drop-in replacement for rm that uses the trash bin. Written in D

Programming Languages

d
599 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to trash-d

rmw
a safe-remove utility for the command line
Stars: ✭ 48 (-46.67%)
Mutual labels:  trash, freedesktop
dproto
D Protocol Buffer mixins to create structures at compile time
Stars: ✭ 35 (-61.11%)
Mutual labels:  dub
SharpLoader
🔮 [C#] Source code randomizer and compiler
Stars: ✭ 36 (-60%)
Mutual labels:  trash
del-webpack-plugin
A file plugin help you remove old files after webpack (v5) bundling
Stars: ✭ 43 (-52.22%)
Mutual labels:  trash
ioBroker.trashschedule
Calculates trash pickup dates by using an ical calendar
Stars: ✭ 20 (-77.78%)
Mutual labels:  trash
osx-trash
Make Emacs' delete-by-moving-to-trash do what you expect it to do on OS X.
Stars: ✭ 22 (-75.56%)
Mutual labels:  trash
awesome-freedesktop
Freedesktop.org menu and desktop icons support for Awesome WM
Stars: ✭ 93 (+3.33%)
Mutual labels:  freedesktop
notification-thing
Python-based implementation of Desktop Notifications Specification (notification-daemon)
Stars: ✭ 24 (-73.33%)
Mutual labels:  freedesktop
notifications
Gtk Notifications Server
Stars: ✭ 39 (-56.67%)
Mutual labels:  freedesktop
detect-waste
AI to Combat Environmental Pollution - detecting plastic waste in the environment to combat environmental pollution and promote circular economy (Deep Learning, PyTorch)
Stars: ✭ 113 (+25.56%)
Mutual labels:  trash
xdg-xmenu
Generate menu for xmenu
Stars: ✭ 31 (-65.56%)
Mutual labels:  freedesktop
Trash
Move files and directories to the trash
Stars: ✭ 2,293 (+2447.78%)
Mutual labels:  trash
homeassistant-afvalwijzer
Provides sensors for some Dutch waste collectors
Stars: ✭ 119 (+32.22%)
Mutual labels:  trash
rx
Reactive Extensions for D Programming Language
Stars: ✭ 52 (-42.22%)
Mutual labels:  dub
trash
Remove Command using a trash box.
Stars: ✭ 19 (-78.89%)
Mutual labels:  trash
nvidialinuxdriversaretrash.github.io
An aggregate void to yell into about Nvidia's terrible Linux drivers!
Stars: ✭ 20 (-77.78%)
Mutual labels:  trash
flatpak-platform
The elementary OS and AppCenter Flatpak platform
Stars: ✭ 49 (-45.56%)
Mutual labels:  freedesktop
mir-cpuid
BetterC CPU Identification Routines
Stars: ✭ 25 (-72.22%)
Mutual labels:  dub
VsCacheCleaner
🧹 Clear the Visual Studio solution cache, free up your disk space!
Stars: ✭ 69 (-23.33%)
Mutual labels:  trash
scod
A nice documentation generator based on ddox.
Stars: ✭ 32 (-64.44%)
Mutual labels:  dub

trash-d

License GitHub Workflow Status GitHub last commit (branch) GitHub tag (latest SemVer pre-release) Lines of code

A near drop-in replacement for rm that uses the FreeDesktop trash bin. Written in the D programming language using only D's Phobos standard library, and can be compiled with any recent D compiler. This includes GCC, so trash-d should run on any *NIX platform that GCC supports.

ONLY LINUX AND BSD ARE CURRENTLY SUPPORTED!

Windows won't work at all, and MacOS probably won't either. Any POSIX and FreeDesktop compliant system should work fine. For rarer *NIXs like Solaris or AIX, you're on your own though. PRs for expanding support are very welcome!

You can install a pre-built statically-linked version (x86_64-linux) from the GitHub releases page

I gave a brief informal talk about this project and D at DoomConf 2021 (recording is a bit messed up and only has half my talk) you can see also the slides here. I later re-wrote and updated/expanded on the presentation as a blog post.

There are also several posts on the D forums about trash-d, if you want to give those a read.

Installing

Simply drop the trash binary somewhere on your $PATH such as $HOME/.local/bin, or use the provided DEB and RPM packages.

Optionally set alias rm=trash in your shell config to replace usages of rm with trash-d.

Alternatively if there is a package for your OS should probably use that.

Packaging status

Usage

Using trash-d is the same as most other command line utilities, and intentionally very similar to rm.

See the manual for more information.

Building

trash-d can be built using any D compiler, but it uses Dub and DMD by default. You may need to adapt the build scripts, but the code should be completely portable.

You can build it with Dub using dub build and run tests with dub test.

CMake build files can be generated using dub generate cmake.

Using Rake

trash-d uses Ruby and Rake for it's build tooling. These are technically optional and are not required to actually build the project, but make things easier. Use rake -T to list all the available tasks.

To install all Ruby dependencies use

gem install --no-format-executable rake ronn-ng fpm

Ruby is required to build the manual page from the markdown file using Ronn-ng and can easily be built with rake manpage. You may also need the ruby-devel and rpmbuild system packages. Install these from your distro's package manager.

Contributing

Contributions welcome! Please come help me clean up my D code, and otherwise make trash-d more useful!

In particular help with packaging trash-d for various distros and expanding support for other operating systems would be greatly appreciated!

However keep in mind that this is a simple tool with a simple job, so it's never going to do that much.

Patches are also accepted via email if that's more your jam, see Contact below for more info.

Version Numbers

Versions of trash-d are numbered sequentially with a bump every time I change some functionality. Consider every change to be a breaking change, and be happily surprised when it's not! I have a bad habit of bumping the number with one commit, only to immediately bump it again before tagging a release. So the releases might have some gaps. Sorry about that...

Version names are changed whenever something major has changed. Don't treat these like actual version indicators, they're just something fun.

License

trash-d is licensed under the terms of the MIT License. You are free to use it for any purpose under the terms of that license.

Similar Projects

Unlike many of these, trash-d does not require an interpreter like Bash or Python, so is more easily portable to new systems.

Contact

You can email me at mailto:[email protected] or open an issue here on GitHub if you need to reach me for whatever reason.

We do not have a mailing list or anything of that sort, but there is an ATOM feed of releases.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].