safe-rm .desktop file for right-click adding action
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-ServiceTy
[Desktop Action add]
#Exec=~
Exec=bash -c 'for i in "$@" ; do echo "$i" >> ~/.safe-rm; done' %F
Name=Add to safe-rm protection list
Related branches
Changed in safe-rm: | |
assignee: | nobody → François Marier (fmarier) |
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