bypass trash, a necessary feature that has been removed in linux desktop environments

This commit is contained in:
adam 2023-11-14 15:06:00 -05:00
parent faa1bf99ed
commit 3ecbc3af7f

19
bash/bypasstrash.sh Executable file
View File

@ -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