Independed Trash as a script which does not require filemager for emptying Trash.
Independed-Trash-deb-and-rpm-packages.zip
If in the Trash has contents, choose dialog is opening.
If If in the Trash has not contents, trash is empty dialog is opening.
If you have removed something as root, then you cannot remove contenst until you have corrected privileges.
sudo chown -Rc $USER:$USER $HOME
Code:
#!/bin/bash
#
# RJP 13.5.2024 Simple trash bin script which is intepended from filemanager
#
#
TRASH=$HOME/.local/share/Trash/files
#
#
if [ -d "$TRASH" ]; then
yad --text-align=center --width=300 --text=$"Would you like to empty Trash?" --title="TRASH"
if [ $? = 0 ]; then
cd $HOME/.local/share/Trash && rm -rf files info expunged
fi
else
yad --text-align=center --width=200 --button=OK:1 --text=$"Trash is empty" --title="TRASH IS EMPTY"
fi