Code: Select all
${LOC1} ${LOC2} ${LOC3}
Code: Select all
'${LOC1}' '${LOC2}' '${LOC3}'
Code: Select all
${LOC1} ${LOC2} ${LOC3}
Code: Select all
'${LOC1}' '${LOC2}' '${LOC3}'
Code: Select all
rox /our/location/file
Code: Select all
# grep -h -r -C1000 "^Name.*=mtPaint" /usr/share/applications --include="*.desktop" | grep '^Exec='
Exec=mtpaintsnapshot.sh
Exec=mtpaint %F
#
Code: Select all
# grep -h -r -C1000 "^Name.*=mtPaint" /usr/share/applications/*.desktop | grep '^Exec='
Exec=mtpaint %F
Exec=mtpaintsnapshot.sh
#
Code: Select all
# grep -h -r -C1000 "^Name.*=mtPaint$" /usr/share/applications --include="*.desktop" | grep '^Exec='
Exec=mtpaint %F
#
Code: Select all
Exec=x11vnc -gui tray=setpass -rfbport PROMPT -bg -o "%HOME/.x11vnc.log.%VNCDISPLAY"
Hello, Jasper.Jasper wrote:Hi musher0.
Find'N'Run v. 0.4 (as I wrote earlier in this thread) works perfectly here with Precise 5.6, but dmenu2 does not; so if you can PM me with a working version of dmenu2 I shall be pleased to try it and then comment.
My regards
Code: Select all
dmenu_run
Weird... I ran my tests in Puppy Precise 5.4.3. Does FindNRun need aLazY Puppy wrote:Seems to work here as expected.
Tested in Tahr 6.0.
(...)
Yep, that's another "unexpected" side effect caused by the use of '--include' option.LazY Puppy wrote:Though it seems to have lost its capacity to handle symbolic links in /usr/share/applications.
F'N'R requires Gtkdialog >= 0.8.3, which is a standard in Puppies released in the past 2 years.musher0 wrote:Find'N'Run only works if you double click on the name of the program in
the list. No other way.
The "tick" for "stay open" doesn't work. The window closes anyway when
the selected program is launched.
Finally, if you type anything in the top rectangle to narrow the search, the
entire window closes.
This script needs a serious re-fit... Good luck!
Yes, it's fixed!Yep, that's another "unexpected" side effect caused by the use of '--include' option.Fixed now, thanks!
Code: Select all
grep -F -i -- "$varENTRY"
Thanks, this works.SFR wrote:If you remove -F from:you'll be able to use wildcards like in grep (e.g.: . for a single char and .* for many).Code: Select all
grep -F -i -- "$varENTRY"
I have used '-F|--fixed-strings' on purpose, because regexp requires some extra knowledge from users and disables ability to search for some of characters, unless you escape them.
Greetings!
I have a function that returns to me (to a bash script) current boot partition and directory.[Desktop Entry]
Encoding=UTF-8
Name=Scripts - - Create-Symbolic-Links <--- just translated for SFR
Name[de]=Skripte - - Symbolische-Links-erzeugen
Exec=/mnt/sde1/Skripte/Symbolische-Links-erzeugen
Icon=/usr/share/pixmaps/rshavatar48.png
NoDisplay=true
Need to use sed, no?<action>X="$(grep -h -r -C1000 "^Name.*=.*${varLIST}$" '${LOC1}' '${LOC2}' '${LOC3}' --include="*.desktop" 2>/dev/null | grep -m1 "^Exec=" | cut -f2- -d "=")"; eval ${X% \%*} &</action>
Well, sed would be the easiest way, I guess:LazY Puppy wrote:Need to use sed, no?
Code: Select all
<action>X="$(grep -h -R -C1000 "^Name.*=${varLIST}$" '${LOC1}' '${LOC2}' '${LOC3}' --include="*.desktop" 2>/dev/null | grep -m1 "^Exec=" | cut -f2- -d "=" | sed "s|MYBOOTPARTITION|'${LP2BPL}'|")"; eval ${X% \%*} &</action>
YES! Thanks.SFR wrote:Works ok?![]()
Code: Select all
Exec=/mnt/sde2/RoxApps/RSH/SearchAndExecute/defaulthandler /mnt/sde1/Dateien/Bilder/Antike-Karten/Antiquity.tar.gz
Code: Select all
sed "s|MYBOOTPARTITION|'${LP2BPL}'|
andSFR wrote:... the ability to fallback to the default Name= if no lang, basing on the assumption that practically always Name[lang]= is after Name=.
Well, have had time now for check and fix.L18L wrote:And the condition "Name[lang]= is after Name=" will have to be checked and fixed. No problem: just work!
Will need some more time.
Code: Select all
#!/bin/sh
# sort_translations
# check and fix order of translations of Comment, Name and GenericName
# in *.desktop files; takes about 4 sec
DIR=/usr/share/applications
mv -f ${DIR} ${DIR}_ || exit 1
mkdir -p ${DIR}
cd ${DIR}_
for f in `ls *.desktop`; do
sed q $f > ${DIR}/${f} # first line: [Desktop Entry]
sort $f | grep -v '^\[' >> ${DIR}/${f}
done
cd -
rm -rf ${DIR}_
exit 0
Code: Select all
# grep -H -E '^Name\[.*\]=|^Name=' /usr/share/applications/*.desktop | sort -t: -u -k1,1 | grep -v ':Name='
/usr/share/applications/Puppy-Podcast-Grabber.desktop:Name[bg]=Puppy