Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: trash can for gnome dash/dash to dock

  1. #11
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    Trash.zip

    here's the fixed version with the exit 0 still there so it don't go into an icon swap loop.

  2. #12
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    somethings wrong with the script, the applications are throbbing. i'll look into it & try to fix.

  3. #13
    Join Date
    Apr 2018
    Beans
    62
    Distro
    Ubuntu

    Re: trash can for gnome dash/dash to dock

    I'm guessing this part is wrong:
    Code:
    "$(cat $icon | grep Icon=user-trash-full)"
    ... 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?
    My Ubuntu / Linux / open source website LinuxUprising.

  4. #14
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    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.

  5. #15
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    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.

  6. #16
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    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.

  7. #17
    Join Date
    Apr 2018
    Beans
    62
    Distro
    Ubuntu

    Re: trash can for gnome dash/dash to dock

    It works great now, thanks!
    My Ubuntu / Linux / open source website LinuxUprising.

  8. #18
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    Quote Originally Posted by logix2 View Post
    It works great now, thanks!
    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.

  9. #19
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    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.

  10. #20
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: trash can for gnome dash/dash to dock

    Trash.zip

    latest for gnome
    Last edited by kerry_s; June 19th, 2018 at 07:42 AM.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •