Browse Source

Add kde-servicemenus-destroyfile

master
Pekka Helenius 5 years ago
parent
commit
2046472e7b
4 changed files with 52 additions and 0 deletions
  1. +6
    -0
      Readme.md
  2. +18
    -0
      kde-servicemenus-destroyfile/PKGBUILD
  3. +14
    -0
      kde-servicemenus-destroyfile/dolphin-destroyfile.desktop
  4. +14
    -0
      kde-servicemenus-destroyfile/dolphin-destroyfile.sh

+ 6
- 0
Readme.md View File

@ -60,6 +60,12 @@ Adds a KDE5 compatible shortcut file for magiclantern-bootablecard package. If y
**FORMAT:** Arch Linux PKGBUILD script + source files.
## [kde-servicemenus-destroyfile](kde-servicemenus-destroyfile)
Plasma 5 Dolphin service menu script for destroying files with `shred`.
**FORMAT:** Arch Linux PKGBUILD script + source files.
## [kde-servicemenus-dualiso](kde-servicemenus-dualiso)
Plasma 5 Dolphin service menu script for cr2hdr package.


+ 18
- 0
kde-servicemenus-destroyfile/PKGBUILD View File

@ -0,0 +1,18 @@
pkgname=kde-servicemenus-destroyfile
pkgver=1
pkgrel=1
pkgdesc="A KDE service menu entry for destroying files with shred (KDE5 Dolphin action)"
arch=('any')
url=""
license=('GPL')
depends=('coreutils' 'dolphin' 'kdialog' 'libnotify')
source=('dolphin-destroyfile.desktop'
'dolphin-destroyfile.sh')
md5sums=('c7b3ed98ea6ec462c598d720f5c21c4a'
'1944d544ee7666864ed7822c18add4d9')
package() {
mkdir -p $pkgdir/usr/share/kservices5/ServiceMenus/
install -m 755 $srcdir/dolphin-destroyfile.desktop $pkgdir/usr/share/kservices5/ServiceMenus/dolphin-destroyfile.desktop
install -m 755 $srcdir/dolphin-destroyfile.sh $pkgdir/usr/share/kservices5/ServiceMenus/dolphin-destroyfile.sh
}

+ 14
- 0
kde-servicemenus-destroyfile/dolphin-destroyfile.desktop View File

@ -0,0 +1,14 @@
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/octet-stream
Icon=editclear
Actions=destroy_file;
X-KDE-StartupNotify=false
X-KDE-Priority=TopLevel
#TryExec=shred
[Desktop Action destroy_file]
Name=Destroy File
Icon=editclear
Exec=/usr/share/kservices5/ServiceMenus/dolphin-destroyfile.sh %U

+ 14
- 0
kde-servicemenus-destroyfile/dolphin-destroyfile.sh View File

@ -0,0 +1,14 @@
#!/bin/env bash
kdialog --yesno "Destroy selected file(s)?" --title Destroy
answer=$(echo "$?")
if [ "$answer" == 0 ]; then
while [ $# -gt 0 ]; do
shred -n 3 -u "$1"
shift
done
notify-send "File Destroy" -i dialog-ok 'Target file(s) destroyed'
else
exit
fi

Loading…
Cancel
Save