@ -0,0 +1,27 @@ | |||||
pkgname=kde-servicemenus-searchactions | |||||
pkgver=1 | |||||
pkgrel=1 | |||||
pkgdesc="Search strings inside files using Dolphin or Konqueror (KDE5 Dolphin action)" | |||||
url="" | |||||
arch=('any') | |||||
license=('BSD') | |||||
install='' | |||||
source=( | |||||
searchinside.desktop | |||||
searchinside.sh | |||||
searchinside-casesensitive.sh | |||||
) | |||||
depends=('kdialog' 'grep' 'findutils' 'dolphin' 'konsole') | |||||
optdepends=() | |||||
conflicts=() | |||||
#provides='' | |||||
makedepends=() | |||||
package() { | |||||
mkdir -p $pkgdir/usr/share/kservices5/ServiceMenus/ | |||||
cp $srcdir/{searchinside.desktop,searchinside.sh,searchinside-casesensitive.sh} $pkgdir/usr/share/kservices5/ServiceMenus/ | |||||
chmod 755 $pkgdir/usr/share/kservices5/ServiceMenus/{searchinside.desktop,searchinside.sh,searchinside-casesensitive.sh} | |||||
} | |||||
md5sums=('97e0476998ae35c034316e07623463b1' | |||||
'5466d8b1b6334ea5a7ce9b5e586545af' | |||||
'e78a0246503d95489730ec71bb998a97') |
@ -0,0 +1,10 @@ | |||||
#!/bin/bash | |||||
THISFOLDER=$(pwd) | |||||
echo -e "\e[1mSearch inside files -- [case sensitive]\e[0m" | |||||
echo -e "\nCurrent search folder: $THISFOLDER\n" | |||||
read -r -p "Enter string to search: " STRING | |||||
echo -e "\nFiles containing the string \e[93m$STRING\e[0m in \e[94m$THISFOLDER/\e[0m and subfolders are:\n\e[32m" | |||||
grep -Rls $STRING $THISFOLDER | |||||
echo -e "\e[91m\nSearch finished\e[0m" |
@ -0,0 +1,19 @@ | |||||
[Desktop Entry] | |||||
Type=Service | |||||
ServiceTypes=KonqPopupMenu/Plugin | |||||
MimeType=inode/directory | |||||
Icon=system-search | |||||
Actions=searchinside;searchinside-casesensitive; | |||||
X-KDE-StartupNotify=false | |||||
X-KDE-Priority=TopLevel | |||||
TryExec=grep | |||||
[Desktop Action searchinside-casesensitive] | |||||
Name=Search inside files (case sensitive) | |||||
Icon=system-search | |||||
Exec=konsole --workdir $(pwd) -p "tabtitle=Search [case sensitive]" -e /usr/share/kservices5/ServiceMenus/searchinside-casesensitive.sh | |||||
[Desktop Action searchinside] | |||||
Name=Search inside files (ignore case) | |||||
Icon=system-search | |||||
Exec=konsole --workdir $(pwd) -p "tabtitle=Search [ignore case]" -e /usr/share/kservices5/ServiceMenus/searchinside.sh |
@ -0,0 +1,10 @@ | |||||
#!/bin/bash | |||||
THISFOLDER=$(pwd) | |||||
echo -e "\e[1mSearch inside files -- [ignore case]\e[0m" | |||||
echo -e "\nCurrent search folder: $THISFOLDER\n" | |||||
read -r -p "Enter string to search: " STRING | |||||
echo -e "\nFiles containing the string \e[93m$STRING\e[0m in \e[94m$THISFOLDER/\e[0m and subfolders are:\n\e[32m" | |||||
grep -Rils $STRING $THISFOLDER | |||||
echo -e "\e[91m\nSearch finished\e[0m" |