| Author |
Message |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: 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.
| Description |
Binary
|

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

Download |
| Filename |
awmenu.c.gz |
| Filesize |
2.46 KB |
| Downloaded |
257 Time(s) |
| Description |
|
| Filesize |
16.07 KB |
| Viewed |
1366 Time(s) |

|
|
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1691 Location: Germany
|
Posted: 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.  |
wonderful
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
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1691 Location: Germany
|
Posted: Fri 26 Feb 2010, 08:04 Post subject:
|
|
coudn't resist...
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
| Description |
actual version!
|

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

Download |
| Filename |
awrun-0.1.1.pet |
| Filesize |
1.5 KB |
| Downloaded |
263 Time(s) |
| Description |
|
| Filesize |
11.04 KB |
| Viewed |
1270 Time(s) |

|
| Description |
old version for docu only!
|

Download |
| Filename |
awrun-0.1.pet |
| Filesize |
1.46 KB |
| Downloaded |
272 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
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: 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
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1691 Location: Germany
|
Posted: 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
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: 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
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1775
|
Posted: 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
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: 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
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1691 Location: Germany
|
Posted: 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
|
|
 |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: 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
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 841
|
Posted: 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
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 1641 Location: South Australia
|
Posted: 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
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Sat 27 Feb 2010, 00:29 Post subject:
|
|
Here it is with the second column removed. I also centered it like Launchy.
| Description |
|

Download |
| Filename |
awmenu.c.gz |
| Filesize |
2.51 KB |
| Downloaded |
270 Time(s) |
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3033 Location: Oregon
|
Posted: 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
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: 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
|
|
 |
|