From 3ecbc3af7fe0118c24be004f87d4aefc5575d082 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 14 Nov 2023 15:06:00 -0500 Subject: [PATCH] bypass trash, a necessary feature that has been removed in linux desktop environments --- bash/bypasstrash.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bash/bypasstrash.sh diff --git a/bash/bypasstrash.sh b/bash/bypasstrash.sh new file mode 100755 index 0000000..f90119b --- /dev/null +++ b/bash/bypasstrash.sh @@ -0,0 +1,19 @@ +#/bin/bash +#thanks, bewilderex63. https://unix.stackexchange.com/questions/51840/how-to-disable-trash-can-in-thunar-xfce + +# Once at the start for good measure +rm -rf .local/share/Trash/files/* + +while [ true ] +do + inotifywait ~/.local/share/Trash/files + + # Don't get stuck in a CPU-melting loop if something goes wrong + if [ $? -ne 0 ] + then + exit $? + fi + + # Good riddance + rm -rf .local/share/Trash/files/* +done