Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 22 May 2015, 18:23
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Find'N'Run v1.8
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [72 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1292

PostPosted: Mon 23 Mar 2015, 17:56    Post subject:  Find'N'Run v1.8
Subject description: Find and run apps from .desktop files quickly.
 

Initiated here.
Screenshot says it all, I hope..?

NOTE: F'N'R requires Gtkdialog >= 0.8.3 in order to work properly!

Written by me & L18L
___________

Changelog

Version 0.1:
- initial release

Version 0.2:
- gettext + help tooltips + using Names from within .desktop files (also in native language, if available) [thanks to L18L]

Version 0.3:
- code improvements [me]

Version 0.4:
- compatibility with Gtkdialog 0.7.21 [thanks to RSH/LazY Puppy]

Version 0.5 [L18L]:
- version in title
- help for --help and -h
- smaller input field after text
- tooltip for this field only
- no width-request for window
- TEXTDOMAIN changed

Version 0.6 [me]:
- escape key closes the window [thanks to RSH]
- added "Leave this window opened" checkbox
(both the above changes require Gtkdialog >= 0.8.3 now)

Version 0.7 [L18L]
- "About" & "Exit" buttons

Version 0.8 [me]:
- now as a .pet
- reinstated ROX-App [originally by L18L]
- created icon for ROX-App (thanks to Vovchik's Pikona)
- asks to create a shortcut on the desktop after installation

Version 0.9:
- added 'x' (clear) button to entry field
- added new locations where *.desktop files can be found [thanks to jamesbond]

Version 1.0:
- removed 'Xdialog' dependency
- decreased dimensions of ROX-App icon (128x128 -> 48x48)
- fix: recursive search (grep -r) didn't work
- minor clean up of code

Version 1.1:
- fix for choosing wrong exec in some cases [thanks to jamesbond]

Version 1.2:
- fix: proper handling of "unusual" Exec= lines

Version 1.3:
- fix regression: follow symlinks [thanks to RSH]
- ROX-App dir renamed to "FindNRun" (no single quotes) to avoid problems in Momanager [thanks to L18L]

Version 1.4:
- fix: rare possibility of picking up wrong exec

Version 1.5:
- fix for .desktop files that have 'Name[lang]=' before 'Name=' [L18L, me]

Version 1.6:
- LOCations re-ordered [L18L]
- small correction in code [me]

Version 1.7:
- a bit different, but more fool-proof, approach of searching/filtering

Version 1.8:
- unset all Gtkdialog/exported variables before launching the chosen application (thanks to step)
- added displaying of comments, while browsing the list
- /bin/sh changed to /bin/ash - this is in case if target system has /bin/sh symlinked to dash (F'N'R won't work with dash)

Enjoy &
Greetings!
findnrun-1.8.pet
Description  MD5: 4c8b80748a23fb1cd0d133c8c48c134b findnrun-1.8.pet
pet

 Download 
Filename  findnrun-1.8.pet 
Filesize  6.8 KB 
Downloaded  234 Time(s) 
Screenshot.gif
 Description   
 Filesize   212.83 KB
 Viewed   1019 Time(s)

Screenshot.gif


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Thu 30 Apr 2015, 05:15; edited 17 times in total
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 514
Location: Germany

PostPosted: Mon 23 Mar 2015, 18:15    Post subject:  

Thank you very much for Find'N'Run.

This is exactly what I'd needed to complete my Application Kiosk, a Dashboard-like Program, which offers all Applications of all .desktop Files in a gtkdialog GUI - categorized and sorted in Alphabetical Order related to Language-Setup.

It was inspired by an early version of Icon Finder.

Now my Application Kiosk has added find and run function! Very Happy
image-2.jpg
 Description   
 Filesize   67.86 KB
 Viewed   954 Time(s)

image-2.jpg


_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 514
Location: Germany

PostPosted: Mon 23 Mar 2015, 22:37    Post subject:  

Quote:
@RSH: actually, no need for gtkdialog4 - it turned out that Gtkdialog 0.7.21 gets pissed off if <tree> widget has no <label>, so it's enough to add one (<label>Name</label>); it's not visible anyway...

Yes, it works out of the box.

Though, I have made a little modification, to keep the GUI opened when executing an application. To close the GUI easily, I added code:
Code:
<action signal="key-press-event" condition="command_is_true([ $KEY_SYM = Escape ] && echo true )">Exit:0</action>

above line:
Code:
</window>' | gtkdialog -s >/dev/null

In this case it seems to need gtkdialog4.
Code:
</window>' | gtkdialog4 -s >/dev/null

Otherwise the GUI is closing immediately when hitting any key.

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2926
Location: www.eussenheim.de/

PostPosted: Tue 24 Mar 2015, 07:00    Post subject: 0.5  

Changelog

version in title
help for --help and -h
smaller input field after text
tooltip for this field only
no width-request for window
TEXTDOMAIN changed
findNrun-0.5.png
 Description   
 Filesize   9.17 KB
 Viewed   892 Time(s)

findNrun-0.5.png

findnrun.gz
Description 
gz

 Download 
Filename  findnrun.gz 
Filesize  892 Bytes 
Downloaded  48 Time(s) 
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1292

PostPosted: Tue 24 Mar 2015, 08:56    Post subject:  

Thanks L18L & RSH, new version uploaded.
See the first post for changelog.

EDIT: quick reupload - added use-underline to the checkbox, so can be toggled via keyboard shortcut (Alt+first letter).

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
cimarron

Joined: 30 May 2013
Posts: 207

PostPosted: Tue 24 Mar 2015, 09:11    Post subject:  

Very nice (and FAST)! Thank you!
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2926
Location: www.eussenheim.de/

PostPosted: Tue 24 Mar 2015, 12:13    Post subject: 0.7  

"About" added

also included:
SFR wrote:
- added use-underline to the checkbox, so can be toggled via keyboard shortcut (Alt+first letter).
findNrun-0.7.png
 Description   
 Filesize   23.74 KB
 Viewed   816 Time(s)

findNrun-0.7.png

findnrun.gz
Description 
gz

 Download 
Filename  findnrun.gz 
Filesize  1.4 KB 
Downloaded  44 Time(s) 
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5309
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Mar 2015, 12:51    Post subject:  

Hi, SFR.

Coming from you, I'm sure it is well done, but... dmenu2 already exists, no?

Why such a script ?

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 5309
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Mar 2015, 12:57    Post subject:  

Hello, again.

For those interested in a not-so-CLI interface, not so long ago, I've also
come up with a list of *.desktop executables by categories. Please see
http://www.murga-linux.com/puppy/viewtopic.php?p=833483&sort=lastpost&search_id=84433025#833483
and ff.

Thanks for your time and best regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1292

PostPosted: Tue 24 Mar 2015, 14:09    Post subject:  

@Musher0: What dmenu2 does? I tried to see what's that (using it along with your script), but it segfaults on me (FD64-700):
Code:
# ./z: line 18: 30311 Segmentation fault      ./dmenu -t -name dmenu2-wmx -i -l 15 -p dmenu2-wmx -nb '#8B795E' -nf '#FFFFF0' -sb '#FFFFF0' -sf '#8B795E' -b -y 605 -x 515 -o 0.7 -h 24 -w 300 -fn 'Monaco-11:italic' "$@" < "$cache"

From what I found it's "a dynamic menu for X" and I'm not sure if it's exactly the same scope as F'N'R's...
Quote:
Why such a script ?

Because I (we) can..? Wink
___________

Thanks L18L, your changes included, although I threw out HELP1 & HELP2 lines from About, as they're in the main GUI anyway.

Ok, it's time for a break for me.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2926
Location: www.eussenheim.de/

PostPosted: Tue 24 Mar 2015, 14:47    Post subject: retro 0.7 KISS  

Here the KISS version 0.7
Code:

sit /usr/local/lib/X11/pixmaps/bigred48.png "find an app" findnrun "findnrun -" &


Dogs must sit.
technosaurus gave us sit.
Thus I was able to let Fatdog (use) sit.

bigred in panel
- hover : tooltip
- leftclick: find_N_run
- right click: About
sit-findNrun-0.7.png
 Description   
 Filesize   37.99 KB
 Viewed   763 Time(s)

sit-findNrun-0.7.png

Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5309
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Mar 2015, 16:16    Post subject:  

SFR wrote:
@Musher0: What dmenu2 does? I tried to see what's that (using it along with your script), but it segfaults on me (FD64-700):
Code:
# ./z: line 18: 30311 Segmentation fault      ./dmenu -t -name dmenu2-wmx -i -l 15 -p dmenu2-wmx -nb '#8B795E' -nf '#FFFFF0' -sb '#FFFFF0' -sf '#8B795E' -b -y 605 -x 515 -o 0.7 -h 24 -w 300 -fn 'Monaco-11:italic' "$@" < "$cache"

From what I found it's "a dynamic menu for X" and I'm not sure if it's exactly the same scope as F'N'R's...
Quote:
Why such a script ?

Because I (we) can..? Wink
___________

Thanks L18L, your changes included, although I threw out HELP1 & HELP2 lines from About, as they're in the main GUI anyway.

Ok, it's time for a break for me.

Greetings!


Hello, SFR.

You do not know dmenu?
It started as the menu for the dwm window manager. Now it has
independent variants. You can adapt it to all kinds of needs.
https://bbs.archlinux.org/viewtopic.php?id=80145

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Moat

Joined: 16 Jul 2013
Posts: 342

PostPosted: Tue 24 Mar 2015, 18:28    Post subject:  

Great little app, working in Precise 5.7.1 w/Openbox-LxPanel!

Would it be possible to incorporate this into the (first, main) menu window (like a 'category')? LxPanel's menu includes a similar 'Run' function (see screenshot), but it seems to look for commands, and misses many of the menu's normal application entries (.desktop files from /usr/share/applications). That would be killer!

Thanks,

Bob
run in LxPanel_2015-03-24(1).jpg
 Description   LxPanel's 'Run' entry
 Filesize   18.54 KB
 Viewed   690 Time(s)

run in LxPanel_2015-03-24(1).jpg

Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 514
Location: Germany

PostPosted: Tue 24 Mar 2015, 21:38    Post subject:  

musher0 wrote:
Hi, SFR.

Coming from you, I'm sure it is well done, but... dmenu2 already exists, no?

Why such a script ?

BFN.

musher0

musher0 wrote:
Hello, SFR.

You do not know dmenu?
It started as the menu for the dwm window manager. Now it has
independent variants. You can adapt it to all kinds of needs.
https://bbs.archlinux.org/viewtopic.php?id=80145

BFN.

musher0

Moat wrote:
Great little app, working in Precise 5.7.1 w/Openbox-LxPanel!

Yes, this is really the coolest Script I have seen since the invention of gnewpet.

I gave dmenu2 a quick shot, but wasn't that much impressed of. Of course it could not offer all its advantages by such a quick shot, but I'm just too lazy and/or too busy to read all the posts of musher0 to dmenu2 and also to search the Dmenu Hacking Thread.

Besides this, Find'N'Run seems to use dependencies only, that are already installed in a Puppy. It doesn't need to install anything else like it would be needed for dmenu/dmenu2. Saves me one remaster at least!

Since I'm now quite familiar with bash and gtkdialog it's also much easier for me to modify Find'N'Run (what I've already done) and I like also its use of the .desktop files to search for the applications.

To make it able to offer to me also my external Scripts and the SFS Modules in my Modules Directory, I wrote two little Scripts, that are creating .desktop Files from my external Scripts Directory, /mnt/$LP2BPL/Skripte and my external SFS Modules Directory, /mnt/$LP2BPL/Module.

By default it now offers .desktop files from /usr/share/applications and from /tmp/ScriptApplications (contains those created from external Scripts Directory). The left frame (/usr/share/applications) can switch to /tmp/SFSApplications (contains those created from external SFS Modules Directory) and back.

Starting my modifications from Find'N'Run version 0.4, I have made it a RoxApp Directory and placed it at my external RoxApps Directory and am starting it from a Menu Pipe (existing for Openbox, JWM, IceWm and Fluxbox) pointing to that directory.

Renamed it to Search-and-Execute to not to conflict with Find'N'Run.

Next step is to have only a single entry field for both of the lists.

So, Find'N'Run to me is the application of the month 03/2015! Cool
image-1.jpg
 Description   
 Filesize   72.08 KB
 Viewed   671 Time(s)

image-1.jpg


_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2457
Location: The Blue Marble

PostPosted: Wed 25 Mar 2015, 00:24    Post subject:  

Interesting development! I'm waiting for the development to stabilise a bit before incorporating this to Fatdog.
Just a note - 'sit' will work for all puppies. For Fatdog, I will probably just put it the quicklaunch section (the one that has web browser, control panel, etc) and perhaps assign a keyboard shortcut to it (Alt-F1 opens the openbox menu, Alt-F2 currently will launch gexec, perhaps this will get Alt-F3).

EDIT: Version 0.8 now merged to Fatdog.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread

Last edited by jamesbond on Wed 25 Mar 2015, 03:58; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 5 [72 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1084s ][ Queries: 12 (0.0054s) ][ GZIP on ]