Trashcan Possible? [SOLVED]

Forum Forums New users New Users and General Questions Trashcan Possible? [SOLVED]

  • This topic has 9 replies, 6 voices, and was last updated Aug 12-9:29 am by PPC.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #41223
    Member
    Mynaardt

      Hello Everyone:

      I (almost) forgot that antiX does not have a trashcan thingy like a lot of distros.

      Is there a way to make or simulate one in antiX? Or do I just have to be very careful with the delete key?

      Thanks!

      • This topic was modified 3 years, 10 months ago by Mynaardt.

      What have the Romans ever done for us?
      Apart from: sanitation, medicine, education, wine, public order, irrigation, roads, fresh water, and public health?

      #41231
      Anonymous

        Certain that it has been asked and answered multiple times here in the forum, I used the AdvancedSearch on forum main page and within seconds found the following:

        https://www.antixforum.com/forums/topic/recycle-bin/#post-35069

        The search results contain additional matches; I just pasted link to a post which seems like a good starting point.

        Bear in mind that even if you install a trash//recycle thing, the “Delete” action within some programs will still perform immediate deletion (because their coding is blind//unaware to the possibility that a TrashBin exists).

        #41232
        Member
        Mynaardt

          Hi Skidoo:

          Okay, thanks for that.

          Following some of those links it looks as if that solution may no longer be available.

          Not a big deal; it was in the ‘nice to have’ category, so I’m not going to worry about it.

          But I will be mindful of using the Delete button!

          What have the Romans ever done for us?
          Apart from: sanitation, medicine, education, wine, public order, irrigation, roads, fresh water, and public health?

          #41235
          Anonymous

            corbielle trashcan plugin for spaceFM is available here: http://github.com/jpfleury/corbeille-spacefm

            websearch (startpage.com): rox-filer trash|recycle
            ^—v
            http://github.com/fgb/rox-trasher
            and
            http://antixlinux.com/forum-archive/a-trashcan-recycle-bin-for-antix-full-t4617.html
            showed up in the page1 search results

            #41240
            Member
            oops

              FI: Or you can add, for example, into the toolbar and/or your menu files (/home/yourUser/.icewm)

              prog "Corbeille-Trash" /usr/share/icons/Papirus/22x22/apps/trashindicator.svg sh -c "thunar /home/$USER/.local/share/Trash/files/"
              # or
              prog "Corbeille-Trash" /usr/share/icons/Papirus/22x22/apps/trashindicator.svg sh -c "exo-open --launch FileManager /home/$USER/.local/share/Trash/files/"
              #42105
              Member
              PPC

                I know this thread is already marked as solved, but I offer another option to have a “Trashcan”/” Recycle bin” in antiX, since Corbeille seems to longer to have a current download page ( I had to install it from the internet archive):

                Install “trash-cli”
                You can install this application through Synaptic or the command line:
                sudo apt install trash-cli

                This application includes several commands:
                – trash [name_of_file(s)_or_folder(s)_to_delete]
                this command sends the files or folders to the trash (probably the folder ~/.local/share/Trash/ )
                – trash-list
                this command lists all files and folders in the “Trash”/”Recycle” – each has a corresponding number. Choose the number of the file(s) to restore
                – trash-restore
                this command allows to recover files and folders sent to the “Trash”/”Recycle Bin
                – trash-empty
                this command empties the Recycle Bin

                If you choose to install this application, you will have to do your File/Files Manager, use the trash command instead of the usual “delete permanently” command.
                To do this in SpaceFM:

                – Open SpaceFM and in your “View” > “Design mode” menu and click “Ok” on the on-screen prompt
                – Use caution, navigate to the folder that has something you want to send to the recycle bin. Right Click anywhere in the SpaceFM window.
                – In the context menu that appears (that has the options, “Open”, etc), right-click on any of the options that don’t have “>” on the right.
                – In the new menu that appears (with the options “Cut”, “Copy”, “Paste”, etc.), click on “New” > “Command”.
                – The window will appear to name the new item (“Set new item name”). In the field to choose the name enter, for example “Send to Recycle bin”. Click the “Ok” button
                – In the next window (with the title “Menu item properties”) enter the command
                trash %F

                and click OK.
                – In SpaceFM’s context menu, which appears when right clicking on a file or folder, you will see a new option, following the previous example, will be “Send to Recycle bin”. Only one step remains, to associate this new command to the “Delete” key. To do this select this new menu entry with the mouse pointer and right click. Click on “Key shortcut”. It will suggest the “Define key” window. Press, on your keyboard, “Delete” (or “Del”). The contents of the window will change, to inform that this key is already assigned to another command (the command that definitively deletes files/folder). To confirm that you want to associate it to this new command, click on the last button of that window, “Defined”.

                Now, whenever you select files or folders in SpaceFM and press the “delete” key, or select in its menu “send to recycle”, the files/folders concerned will go to “Recycle” instead of being deleted.

                You can use SpaceFM to access the “Recycle bin” folder directly (and thus restore the files or delete them permanently):
                – In SpaceFM go to the “Recycle bin” folder, which should be “~/.local/share/Trash/”.
                – In SpaceFM click on the “Bookmarks” menu and confirm that the first “Show Bookmarks” field has a tick. Then click on “New Bookmark”. A new bookmark, called “Files” will appear on the left. This marker allows immediate access to Recycle. Right-click on this new entry, click on “properties” and choose a new name (like “Recycle bin”). You can choose an icon for this entry. When finished, click “Ok”.

                P.

                • This reply was modified 3 years, 2 months ago by Brian Masinick. Reason: typo
                #89428
                Member
                stevesr0

                  Hi PPC,

                  This approach works on my system with zzzfm, but fails with SpaceFM (I have both installed).

                  As zzzfm has been accepted as a SpaceFM replacement, this is probably not too important for most folks.

                  (Parenthetically, I still haven’t gotten the Delete button linked to perform a mv to the trash/recycle bin.)

                  stevesr0

                  #89894
                  Member
                  Mynaardt

                    The trash can thing already seems to be installed with zzzFM, is it not?

                    I was bumbling along with PPC’s suggestion for Space FM on zzzFM, when I noticed that…

                    What have the Romans ever done for us?
                    Apart from: sanitation, medicine, education, wine, public order, irrigation, roads, fresh water, and public health?

                    #113622
                    Member
                    Kempelen

                      Thanks everyone for the great solution. A small improvement to @PPC ‘s scripts, to have a confirm dialog before moving item to trash. I’m not sure how to format this in this forum, the part which is in an “code box” has to be between “backticks” (an apostrophe like character that is backwards).

                      Instead of

                      trash %F

                      This will ask confirmation:

                      eval “zzzfm -g --label "Move to Trash?" --button yes --button no
                      if [[ “$dialog_pressed” == “button1” ]]; then
                      trash %F
                      fi

                      And if you want an Empty Trash menu, add a New -> Command to the Tools menu with this:

                      eval “zzzfm -g --label "Empty trash?" --button yes --button no
                      if [[ “$dialog_pressed” == “button1” ]]; then
                      trash-empty
                      fi

                      • This reply was modified 11 months, 2 weeks ago by Kempelen.
                      • This reply was modified 11 months, 2 weeks ago by Kempelen.
                      • This reply was modified 11 months, 2 weeks ago by Kempelen.
                      #114049
                      Member
                      PPC

                        Hi. Thanks for the suggestion!
                        The reason I choose not to implement a confirmation dialog when sending files/folders to the Trash Can was because, by that action’s own nature, users can very easily undo it…
                        A more advanced implementation of the Trash Can, that includes a fully working “Restore (from Trash)” contextual menu should be available in antX-23 final, in zzzfm, that should be the default File Manager.

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.