alright peoples final script. should be user neutral just place in $HOME/Documents & make executable.
Code:
#!/bin/bash
icon=$HOME/.local/share/applications/trash.desktop
while getopts "red" opt; do
case $opt in
r)
if [ "$(gio list trash://)" ]; then
echo -e '[Desktop Entry]\nType=Application\nName=Trash\nComment=Trash\nIcon=user-trash-full\nExec=nautilus trash://\nCategories=Utility;\nActions=trash;\n\n[Desktop Action trash]\nName=Empty Trash\nExec='$HOME/Documents/trash.sh -e'\n' > $icon
fi
;;
e)
gio trash --empty && echo -e '[Desktop Entry]\nType=Application\nName=Trash\nComment=Trash\nIcon=user-trash\nExec=nautilus trash://\nCategories=Utility;\nActions=trash;\n\n[Desktop Action trash]\nName=Empty Trash\nExec='$HOME/Documents/trash.sh -e'\n' > $icon
;;
d)
while sleep 5; do ($HOME/Documents/trash.sh -r &) ; done
;;
esac
done
once placed in Documents, open a terminal there, run-> trash.sh -e <- this will create trash.desktop in $HOME/.local/share/applications
final piece, you need to add to autostart-> trash.sh -d
example of my ~/.config/autostart/trash-icon.desktop:
Code:
[Desktop Entry]
Type=Application
Name=Trash Icon
Icon=user-trash
Exec=/home/user/Documents/trash.sh -d
enjoy your new trash icon for dash/dash to dock.
Screenshot from 2018-05-07 10-39-47.jpgScreenshot from 2018-05-07 10-38-49.jpgScreenshot from 2018-05-08 19-22-01.jpg
Trash.zip
Bookmarks