safe-rm .desktop file for right-click adding action

Bug #1070368 reported by quazgar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Safe-rm
Fix Released
Wishlist
François Marier
safe-rm (Debian)
Fix Released
Undecided
François Marier
safe-rm (Ubuntu)
Fix Released
Undecided
François Marier

Bug Description

See the following .desktop file: It adds a right-click action (at least in KDE) which allows users to add items to their ~/.safe-rm file. With a little shell script this might be improved to avoid duplicates and maybe even to remove files from the ~/.safe-rm prevention list.

################################
# Desktop entry for safe-rm right-click menu
#
[Desktop Entry]
Version=1.0
Type=Service
Name=safe-rm
Comment=A small safeguard against accidental removal of important files
Actions=add;
X-KDE-ServiceTypes=all/allfiles,inode/directory,KonqPopupMenu/Plugin

[Desktop Action add]
#Exec=~/.local/bin/add_safe-rm %F
Exec=bash -c 'for i in "$@" ; do echo "$i" >> ~/.safe-rm; done' %F
Name=Add to safe-rm protection list

Related branches

Revision history for this message
quazgar (quazgar) wrote :

One small change, the Exec line needs one dummy argument because bash -c fills the command line arguments starting from $0:

Exec=bash -c 'for i in "$@" ; do echo "$i" >> ${HOME}/.safe-rm; done' dummy %F

Revision history for this message
François Marier (fmarier) wrote :

That's a really neat idea! Thanks for sharing that.

I'll have to think about how to best integrate it into the package, but right now I'm thinking of adding it to /usr/share/doc/safe-rm/examples/.

Changed in safe-rm:
status: New → Triaged
importance: Undecided → Wishlist
Changed in safe-rm:
assignee: nobody → François Marier (fmarier)
Revision history for this message
François Marier (fmarier) wrote :

Included the safe-rm.desktop file in the latest upload to Debian unstable.

Changed in safe-rm (Debian):
assignee: nobody → François Marier (fmarier)
status: New → Fix Released
Changed in safe-rm (Ubuntu):
status: New → Fix Committed
assignee: nobody → François Marier (fmarier)
Revision history for this message
François Marier (fmarier) wrote :

It's now included in the Debian package.

Changed in safe-rm:
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package safe-rm - 0.10-2

---------------
safe-rm (0.10-2) unstable; urgency=low

  * Fix watch file
  * Add desktop file to easily add files to the blacklist (LP: #1070368)

 -- Francois Marier <email address hidden> Mon, 10 Jun 2013 13:37:48 +1200

Changed in safe-rm (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers