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 Thu 18 Sep 2014, 07:41
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
appfinder - finds menu apps
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 27 Dec 2010, 04:35    Post subject:  appfinder - finds menu apps  

Helpful for quickly locating name/location of menu apps.
Shows desktop entry and exec; accepts '*' in search.

USAGE: appfinder [search]

Code:

#!/bin/sh

VAR="$(find /usr/share/applications  | grep -i "$1")"
echo "$VAR"

EXEC="$(cat "$VAR" | grep Exec | cut -d"=" -f2)"

LOC="$(which "$EXEC")"
echo "$LOC"
appfinder.png
 Description   
 Filesize   4.65 KB
 Viewed   592 Time(s)

appfinder.png

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

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 27 Dec 2010, 13:55    Post subject:  

Hey jpeps

do a search for pmenu


you will find a lot of good stuff you could use

here are some links

http://www.murga-linux.com/puppy/viewtopic.php?search_id=734172448&t=40277
http://www.murga-linux.com/puppy/viewtopic.php?search_id=734172448&t=57805

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 27 Dec 2010, 17:19    Post subject:  

big_bass wrote:
Hey jpeps

do a search for pmenu
you will find a lot of good stuff you could use
here are some links


Hi Joe.
Thanks...pmenu looks good. It's great to have useful apps written in script, so that they can be easily adapted. For example, I might change the remove path so it's not taking up ram. Looks like you had similar ideas with TXZ packages. I use appfinder as part of a remaster script where removed items get placed in an SFS package.

edit: also, pmemu doesn't give you the /path/name of the app.
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Tue 28 Dec 2010, 06:32    Post subject:  

hi jpeps,

your result confuses me a little

you're searching for

"pcurl*"

and you're getting

"pcur"

that does not contain the search-string in my opinion???

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 28 Dec 2010, 12:47    Post subject:  

aragon wrote:
hi jpeps,

your result confuses me a little

you're searching for

"pcurl*"

and you're getting

"pcur"

that does not contain the search-string in my opinion???

aragon

Hi aragon,

Works with "*". I demo'd this because PcurlFtp is menu listing.

Code:

find /usr/share/applications | grep -i pcurl*

Last edited by jpeps on Tue 28 Dec 2010, 21:32; edited 1 time in total
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 28 Dec 2010, 17:23    Post subject:  

More sophisticated version; gets menu items not listed in /usr/share/applications (shutdown, restart, etc) * and non-menu apps; included some idiot checks and help (-h).

*should work with any wm as long as there's a .jwmrc file.

Code:

#!/bin/sh

if [ "$1" == "" -o "$1" == "-h" ]; then
 echo "USAGE: appfinder [search]"
exit
fi

DESK="$(sudo find /usr/share/applications  | grep -i "$1")"
[ "$DESK" ] && echo "$DESK"

[ -e "$DESK" ] && EXEC="$(cat "$DESK" | grep Exec | cut -d"=" -f2)"

LOC="$(which "$EXEC")"
[ "$LOC" ] && echo "$LOC"

## Find menu apps not in .desktop
if [ "$DESK" == "" -a "$1" ]; then

VAR="$(cat /root/.jwmrc | grep -i  "$1" | cut -f2 -d ">" | cut -d"<" -f1 | cut -d" " -f2)"
[ "$VAR" ] && JWM="$(which ${VAR})"
[ "$JWM" ] && echo "$JWM"
[ "$1" == "Restart JWM" ] && echo "jwm -restart"

## Non Menu Apps
[ "$VAR" ] || which "$1"
fi
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0537s ][ Queries: 12 (0.0044s) ][ GZIP on ]