Trash.zip
here's the fixed version with the exit 0 still there so it don't go into an icon swap loop.
Trash.zip
here's the fixed version with the exit 0 still there so it don't go into an icon swap loop.
somethings wrong with the script, the applications are throbbing. i'll look into it & try to fix.
I'm guessing this part is wrong:
... since the icon is used as "Icon='$(xdg-user-dir)/Trash/user-trash-full.svg", and not directly as "Icon=user-trash-full" so that statement is never true. But what would the "exit 0" be for? If the script exists, the while loop is gone and the icon isn't changed again, or am I wrong?Code:"$(cat $icon | grep Icon=user-trash-full)"
My Ubuntu / Linux / open source website LinuxUprising.
the exit 0 is to stop it replacing the icon if it's already been changed, other wise it keeps replacing the icon till it's emptied.
i need to check if it is emptied(from within files) then swap the icon back. same thing i only want it to change the icon once for each instance, 1 time when there's trash & then again if it's empty.
basically i was doing the swap back through the empty from the icon, but like you say it needs to be more automated for people who empty it from files.
i'm running some tests now.
Last edited by kerry_s; May 23rd, 2018 at 12:51 PM.
Trash.zip
i'm going to leave it be, modify as you wish.
warning/headsup: if you empty from within files, than empty the icon to return it to normal.
adding another loop to check if it's empty causes throbbing/flashing application icons. i just want to keep it simple, i'm not going to put in a whole lot of work just for a trash can.
alright logix2,
give this 1 a try it should work as expected, whether emptied from files or icon.
Trash.zip
let me know what you think or if other problems.
It works great now, thanks!
My Ubuntu / Linux / open source website LinuxUprising.
your welcome, let me know if anything happens. i'm still testing it myself, memory usage seems fine, mine comes out to about 300kib(standard trash daemon runs 2mb), applications look good, there not throbbing/pulsing.
i swear i read at least 75% of gnome dev & freedesktop specs but still can't understand why the simple things are so complicated.
i was thinking about using a similar script for mounted devices, but i think i'm going to pass.
this version uses gvfs for other de's/wm's not running gio.
added sound just for fun.
same thing, run-> ./trash.sh -s <to setup
Trash.tar.gz
this version is for gnome that uses gio.
Trash.zip
Last edited by kerry_s; June 11th, 2018 at 10:41 PM.
Trash.zip
latest for gnome
Last edited by kerry_s; June 19th, 2018 at 07:42 AM.
Bookmarks