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 Tue 02 Sep 2014, 23:09
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Awmenu
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [24 Posts]   Goto page: 1, 2 Next
Author Message
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Thu 25 Feb 2010, 16:34    Post subject:  Awmenu
Subject description: Dmenu meets Launchy
 

I had the good fortune of finding this today. This is much like Dmenu, only nicer looking.

You can use this to search for anything, applications, music libraries, files. You just need to pipe a list into it, and do the right thing with the returned entry.

http://bbs.archlinux.org/viewtopic.php?id=71453

I fixed some memory management issues, and now it works.

I will package it with some scripts needed to make it useful when I get a chance to make them. But I'm so excited, I feel like posting this now. Very Happy
awmenu.gz
Description  Binary
gz

 Download 
Filename  awmenu.gz 
Filesize  5.21 KB 
Downloaded  330 Time(s) 
awmenu.c.gz
Description  to build: gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` awmenu.c -o awmenu
gz

 Download 
Filename  awmenu.c.gz 
Filesize  2.46 KB 
Downloaded  302 Time(s) 
awmenu.jpg
 Description   
 Filesize   16.07 KB
 Viewed   1468 Time(s)

awmenu.jpg

Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 26 Feb 2010, 03:55    Post subject: Re: Awmenu
Subject description: Dmenu meets Launchy
 

jemimah wrote:
I had the good fortune of finding this today. This is much like Dmenu, only nicer looking.

You can use this to search for anything, applications, music libraries, files. You just need to pipe a list into it, and do the right thing with the returned entry.

http://bbs.archlinux.org/viewtopic.php?id=71453

I fixed some memory management issues, and now it works.

I will package it with some scripts needed to make it useful when I get a chance to make them. But I'm so excited, I feel like posting this now. Very Happy


wonderful Very Happy

looking through the arch-forums is 'often' an inspiration...

will test that one soon.

aragon

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

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 26 Feb 2010, 08:04    Post subject:  

coudn't resist... Rolling Eyes

EDITED for Version 0.2, as it is a 'rewrite'.

so here is awrun, a wrapper that gives you awmenu with a list of all *.desktop-files in /usr/share/applications.

we do no longer need symlinks (v. 0.2 up) as we create the list on runtime (using code examples by jemimah, THANKS VERY MUCH).

"awrun" will run awmenu with your list.

so for regular use you might want to assign a keyboard-shortcut to "awrun".

issues (so far):
- i don't know why awmenu displays an entry with 2 columns (see pic). but maybe jemimah has a simple answer... (solved in this version: http://www.murga-linux.com/puppy/viewtopic.php?p=395981#395981)

EDIT:
2010.03.03 update to 0.2 rewrite
2010.03.01 update to 0.1.1 Small bugfix
awrun-0.2.pet
Description  actual version!
pet

 Download 
Filename  awrun-0.2.pet 
Filesize  1.37 KB 
Downloaded  353 Time(s) 
awrun-0.1.1.pet
Description  old version for docu only!
pet

 Download 
Filename  awrun-0.1.1.pet 
Filesize  1.5 KB 
Downloaded  311 Time(s) 
awrun.png
 Description   
 Filesize   11.04 KB
 Viewed   1393 Time(s)

awrun.png

awrun-0.1.pet
Description  old version for docu only!
pet

 Download 
Filename  awrun-0.1.pet 
Filesize  1.46 KB 
Downloaded  319 Time(s) 

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html

Last edited by aragon on Wed 03 Mar 2010, 12:35; edited 2 times in total
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Fri 26 Feb 2010, 11:14    Post subject:  

I was thinking I'd try making the script without indexing. It's probably difficult to install so many applications to slow down the script noticeably.

Also I'm experimenting with adding browser bookmarks to the list, and files in your home directory (this may need an index depending on size). Perhaps it needs a Gui for specifying which directories to search for files.

Then assign awrun to Alt-space and you've got the perfect lightweight launcher for Puppy. I was thinking of calling it Fetch. Is that name already taken?

--

I think the original author gave up before finishing, so I'm guessing the two columns thing is not working correctly. I will try to remove it, as I don't really care if the search function is extremely sophisticated - it seems to do the job fine as it is.
Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 26 Feb 2010, 11:45    Post subject:  

jemimah wrote:
I was thinking I'd try making the script without indexing. It's probably difficult to install so many applications to slow down the script noticeably.

i know you're better than me in these things ... it was just something, i already had. i only did some tuning...

Quote:
Also I'm experimenting with adding browser bookmarks to the list,

from browser?
Quote:
and files in your home directory (this may need an index depending on size).

could be nice
Quote:
Perhaps it needs a Gui for specifying which directories to search for files.

yes, would be definitely better (if the 'door remains open' for free lists ...)

Quote:
I was thinking of calling it Fetch. Is that name already taken?

freshmeat knows none... puppy has had a tool called petch, but unfortunately it's author (and the functionality of his app) has gone...

Quote:
I think the original author gave up before finishing, so I'm guessing the two columns thing is not working correctly. I will try to remove it, as I don't really care if the search function is extremely sophisticated - it seems to do the job fine as it is.

yes, he seems to be back to dmenu (with vertical-patch)... search seems to be ok for me, would be nice if you could strip the 2nd column.

aragon

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


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Fri 26 Feb 2010, 11:59    Post subject:  

All my dmenu scripts are indexing too, but I discovered Rox can open .desktop files so non-indexing is easier than I originally thought.

As far as bookmarks go, I have Chrome, which stores them in a greppable text file. I need to experiment with the other browsers and see how they do it. I was able to successfully dump Chrome's entire History database using the sqlite3 command - but after some experimentation I think this produces to much clutter in the list, bookmarks only seems better.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2240

PostPosted: Fri 26 Feb 2010, 12:43    Post subject:  

Just a suggestion -that fetch doesn't sound like the right name to me... That name is already used for at least one downloader. I really like aewmenu and have used it to provide pop-up menus for several AppDirs before. Can anyone figure out how to get icons working for it?
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Fri 26 Feb 2010, 12:52    Post subject:  

Any name suggestions? - preferably dog related... Rover maybe..

I don't think it would be hard to add icons, I was thinking of attempting it. The question is, how would that affect performance? Could I still pass it 10000 items and expect it to work?
Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 26 Feb 2010, 15:40    Post subject:  

jemimah wrote:
All my dmenu scripts are indexing too, but I discovered Rox can open .desktop files so non-indexing is easier than I originally thought.

that's what i'm using with dmenu and the above script.
- symlink all desktop files from
/usr/share/applications and
/usr/local/share/applications
to
/root/.config/awrun/applications
- cut ".desktop"
- rename all to lowercase
- ls them to awmenu

Quote:
As far as bookmarks go, I have Chrome, which stores them in a greppable text file. I need to experiment with the other browsers and see how they do it. I was able to successfully dump Chrome's entire History database using the sqlite3 command - but after some experimentation I think this produces to much clutter in the list, bookmarks only seems better.

i think this will be a 'problem', if you want to cover all necessary seamonkey, firefox, opera, chrome, (midori),....

opera has a simple formated text file, firefox 3.6 has a 'trashed' text file...

good luck
aragon

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

Joined: 02 Feb 2009
Posts: 897

PostPosted: Fri 26 Feb 2010, 18:30    Post subject:  

jemimah wrote:
As far as bookmarks go, I have Chrome, which stores them in a greppable text file. I need to experiment with the other browsers and see how they do it.

SeaMonkey 1.1 and Firefox 2.X use a bookmarks.html file. 'm fairly sure Opera also uses a bookmarks.html file.

SeaMonkey 2.X and Firefox 3+ have shifted to an SQLite database, but you can set a preference to automatically export that to an HTML file when you exist the browser, or do it manually from the Manage Bookmarks Import and Export function.
______
Dennis
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Fri 26 Feb 2010, 21:01    Post subject:  

Some more stuff to play with....

Most-Used caching (cobbled together from something I saw in the Arch forum and added code) Puts most often used commands at the top of the list and contains all binaries in the path.

Code:
#!/bin/sh

binaries() {
    SPATH=$(IFS=:; for dir in $PATH; do echo "$dir"; done)
    find $SPATH -maxdepth 1 \( -type f -o -type l \) -perm +111 -printf "%f\n"
2> /dev/null
}


DMENU="awmenu"
CACHE="$HOME/.dmenu_cache_recent"

touch $CACHE
MOST_USED=`sort $CACHE | uniq -c | sort -r | cut -c 8-`
RUN=`(echo "$MOST_USED"; binaries | grep -vxF "$MOST_USED") | $DMENU` &&
(echo $RUN; head -n 99 $CACHE) > $CACHE.$$ &&
mv $CACHE.$$ $CACHE
exec $RUN



Thanks jemimah for posting this and aragon is absolutely spot on in calling this the "swiss army knife" of menuing selection.

Cheers,
s
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 1806
Location: South Australia

PostPosted: Fri 26 Feb 2010, 22:34    Post subject:  

I like your name of Fetch but to Puppyise it why not just call it Pfetch.
_________________
Puppy Software <-> Distros <-> Puppy Linux Tips
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Sat 27 Feb 2010, 00:29    Post subject:  

Here it is with the second column removed. I also centered it like Launchy.
awmenu.c.gz
Description 
gz

 Download 
Filename  awmenu.c.gz 
Filesize  2.51 KB 
Downloaded  314 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3365
Location: Oregon

PostPosted: Sat 27 Feb 2010, 03:10    Post subject:  

aragon,
On running awrun -r, although it works, I get a "line 97 to many arguments"
It took me a little while just to determine how to make awmenu work from a command line on a chosen directory.
The instructions on use left a little to be desired for awmenu.
But now I know how it works.

Thank you for awrun. It helped!
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Sun 28 Feb 2010, 15:30    Post subject:  

Here's what I'm working on for Puppeee which has Chrome and Claws. This will allow you to select from applications, bookmarks, contacts, and files in your home directory.


Code:


grep ^Name= /usr/share/applications/*.desktop |cut -d= -f2 > /tmp/list

cat /root/.config/google-chrome/Default/Bookmarks |grep url\": | cut -f4 -d\" >> /tmp/list

grep email= /root/.claws-mail/addrbook/* |cut -f6 -d\" >> /tmp/list

find /root  -not -name ".*" -a -not -path "*Web-Server*" -a -not -path "*Choices*" -not -path "*Startup*" -type f | grep -v '/\.' >> /tmp/list

selection=`cat /tmp/list | awmenu`

case "$selection" in
        '') exit
                ;;
        /*) exec rox $selection
                ;;
        *@*.*) exec rox -U mailto:$selection
                ;;
        *://*) exec rox -U $selection
                ;;
esac

selection=`grep "$selection"  /usr/share/applications/*.desktop |cut -f1 -d:`
if [ ! -z "$selection" ] ; then
        exec rox $selection
fi


To get rox to handle URIs you need to create /root/Choices/URI and set up symlinks as shown.

Code:

# pwd
/root/Choices/URI
# ls -al
total 8
drwxr-xr-x 2 root root 4096 2010-02-26 13:15 .
drwxr-xr-x 9 root root 4096 2010-02-26 13:13 ..
lrwxrwxrwx 1 root root   29 2010-02-26 13:15 file -> /usr/local/bin/defaultbrowser
lrwxrwxrwx 1 root root   13 2010-02-26 13:14 ftp -> /usr/bin/gftp
lrwxrwxrwx 1 root root   29 2010-02-26 13:13 http -> /usr/local/bin/defaultbrowser
lrwxrwxrwx 1 root root   27 2010-02-26 13:15 mailto -> /usr/local/bin/defaultemail
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [24 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
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.1104s ][ Queries: 12 (0.0044s) ][ GZIP on ]