Awmenu
Awmenu
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.
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.
- Attachments
-
- awmenu.gz
- Binary
- (5.21 KiB) Downloaded 580 times
-
- awmenu.c.gz
- to build: gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` awmenu.c -o awmenu
- (2.46 KiB) Downloaded 557 times
-
- awmenu.jpg
- (16.07 KiB) Downloaded 1626 times
Re: Awmenu
wonderfuljemimah 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.
looking through the arch-forums is 'often' an inspiration...
will test that one soon.
aragon
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
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/viewto ... 981#395981)
EDIT:
2010.03.03 update to 0.2 rewrite
2010.03.01 update to 0.1.1 Small bugfix
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/viewto ... 981#395981)
EDIT:
2010.03.03 update to 0.2 rewrite
2010.03.01 update to 0.1.1 Small bugfix
- Attachments
-
- awrun-0.2.pet
- actual version!
- (1.37 KiB) Downloaded 600 times
-
- awrun-0.1.1.pet
- old version for docu only!
- (1.5 KiB) Downloaded 549 times
-
- awrun.png
- (11.04 KiB) Downloaded 1513 times
-
- awrun-0.1.pet
- old version for docu only!
- (1.46 KiB) Downloaded 546 times
Last edited by aragon on Wed 03 Mar 2010, 16:35, edited 2 times in total.
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
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.
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.
i know you're better than me in these things ... it was just something, i already had. i only did some tuning...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.
from browser?Also I'm experimenting with adding browser bookmarks to the list,
could be niceand files in your home directory (this may need an index depending on size).
yes, would be definitely better (if the 'door remains open' for free lists ...)Perhaps it needs a Gui for specifying which directories to search for files.
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...
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.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.
aragon
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
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.
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.
that's what i'm using with dmenu and the above script.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.
- 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
i think this will be a 'problem', if you want to cover all necessary seamonkey, firefox, opera, chrome, (midori),....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.
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
SeaMonkey 1.1 and Firefox 2.X use a bookmarks.html file. 'm fairly sure Opera also uses a bookmarks.html file.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 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
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.
Thanks jemimah for posting this and aragon is absolutely spot on in calling this the "swiss army knife" of menuing selection.
Cheers,
s
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: Select all
#!/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
Cheers,
s
Here it is with the second column removed. I also centered it like Launchy.
- Attachments
-
- awmenu.c.gz
- (2.51 KiB) Downloaded 547 times
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!
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!
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.
To get rox to handle URIs you need to create /root/Choices/URI and set up symlinks as shown.
Code: Select all
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
Code: Select all
# 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
jemimah,
That looks like a great combo of material to search.
One item - the following line can produce multiple hits when matching for the .desktop file to execute.-
You might do the following (more specific and maybe even faster than executing a .desktop file)
Or if no speed difference, match only one instance like this-
Great to have the menu come up in the same spot by the way
Cheers,
s
That looks like a great combo of material to search.
One item - the following line can produce multiple hits when matching for the .desktop file to execute.-
Code: Select all
selection=`grep "$selection" /usr/share/applications/*.desktop |cut -f1 -d:`
Code: Select all
selection=`grep "$selection" /usr/share/applications/*.desktop | grep Exec=|cut -f2 -d=`
Code: Select all
selection=`grep -m 1 "$selection" /usr/share/applications/*.desktop |cut -f1 -d:`
Cheers,
s
yeah line 97 is bad8-bit wrote:aragon,
On running awrun -r, although it works, I get a "line 97 to many arguments"
if you replace
Code: Select all
elif [ ! `ls ${LKDIR}` ]
it should work.elif [ ! "`ls ${LKDIR}`" ] #bugfix 0.1.1
but i will also update the pet in the orig. post.
yes, if you don't know dmenu, you're lost.It took me a little while just to determine how to make awmenu work from a command line on a chosen directory.
@jemimah
will test your updated awmenu soon.
your scripts look very promising
aragon
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
updated awrun to 0.2. see here: http://murga-linux.com/puppy/viewtopic. ... 768#395768
rewrite:
- no symlinks any more! just creating the apps-list on runtime.
aragon
rewrite:
- no symlinks any more! just creating the apps-list on runtime.
aragon
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Here is my Rover package that I'll probably use for Puppeee. This is packed with Xbindkeys, which binds Alt-Space to rover_run.
- Attachments
-
- rover-1.0.pet
- (33.37 KiB) Downloaded 410 times