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 Wed 22 Oct 2014, 08:20
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 Posts_count  
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   594 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*

Edited_time_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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0552s ][ Queries: 13 (0.0041s) ][ GZIP on ]