Re: Script for creating Application Menu



Am Sonntag, den 16.08.2009, 16:40 -0600 schrieb matthew:
> matthew <matth love gmail com> writes:
> 
> > Christopher Roy Bratusek <zanghar freenet de> writes:
> >
> >> Am Sonntag, den 16.08.2009, 20:18 +0200 schrieb Christopher Roy
> >> Bratusek:
> >>> Am Sonntag, den 16.08.2009, 20:09 +0200 schrieb Christopher Roy
> >>> Bratusek:
> >>> > Am Sonntag, den 16.08.2009, 10:18 -0600 schrieb matthew:
> >>> > > Hi.
> >>> > > I made a librep menu generator for .desktop files in a
> >>> > > /usr/share/applications directory, it is attached. 
> >>> > > Let me know if it works for any of you.
> >>> > > 
> >>> > > Put it in a load path and add the following into your .sawfishrc:
> >>> > > 
> >>> > > (require 'mk-saw-menu)
> >>> > > (write-saw-menu)
> >>> > > (require 'saw-menu)
> >>> > > (setq apps-menu saw-apps-menu)
> >>> > > 
> >>> > > You can make it an executable script by uncommenting the last line in the
> >>> > > mk-saw-menu.jl, i.e. (write-saw-menu) and adding the following to the
> >>> > > begining and chmoding the file to +x:
> >>> > > 
> >>> > > #! /bin/sh
> >>> > > exec rep --batch "$0" "$@"
> >>> > > !#
> >>> > > 
> >>> > > Cheers
> >>> > > 
> >>> > 
> >>> > Hi Matthew,
> >>> > 
> >>> > you're script is great and works like a charm.
> >>> > 
> >>> > I also did a few small changes:
> >>> > 
> >>> > - Added Settings Category (Otherwise System contains too many entries
> >>> > and becomes too huge to be usefull (at least on my box))
> >>> > - Re-orderd the Categories (System + Settings at the end for example)
> >>> > - Bumped version to 0.5.2 (just for fun)
> >>> > 
> >>> > Two thoughts:
> >>> > 
> >>> > Also I personally don't see the point for having both Network and
> >>> > Internet Submenus. And there should be an option for ignoring NoDisplay
> >>> > Setting if Categories=GNOME* , as GNOME hides several stuff by default
> >>> > from the menu (say: nautilus, bug-buddy, evince, eog, file-roller and
> >>> > more -- Ugly, I know)
> >>> > 
> >>> > If there are no complaints about it, I would integrate this into sawfish
> >>> > (as sawfish.wm.ext.fdo-menu) and then let the user choose wether to use
> >>> > the apps-menu (the updated version I've posted to the ML yesterday) or
> >>> > this new menu. But I guess It's o.k.
> >>> > 
> >>> > Updated script + Praising Screenshot (with mk-saw-menu + revamped
> >>> > rootmenu (see my yesterdays post)) attached.
> >>> > 
> >>> > Thanks a lot for your efforts,
> >>> > Chris
> >>> > ________________________________________________________________________
> >>> > Sawfish rules!
> >>> 
> >>> ... it does not check for duplicated entries, eg Synaptic twice in the
> >>> menu, but this is just a minor glitch, not a show-stopper :)
> >>> 
> >>> Thanks,
> >>> Chris
> >>> 
> >>
> >> Ah and it should sort entries alphabetically (I promise this was the
> >> last one :p)
> >>
> >> Thanks,
> >> Chris
> >>
> >> _______________________________________________________________________
> >> Sawfish rules!
> >
> > Thanks for the feedback and contributions.
> >
> > I have always felt the same way about Network and Internet menus, it may
> > be good to merge them perhaps.
> >
> > I added two new variables at the begining, 
> >
> > ignore-no-display
> > want-alphebetize
> >
> > Set these as 't to use; 
> > - ignore-no-display will, intuitively, ignore the
> > no-display entries in .desktop files, it is not tied to GNOME* entries,
> > but that can be changed in the future.  
> > - want-alphebetize, when set to 't, will alphebetize the resulting
> > entries inside the individual categories.
> > The alphebetize-entries function just does a simple (sort) using
> > 'string<, which doesn't ignore case, so capital letters will come
> > before lower-case ones, for some reason the 'string-lessp predicate
> > doesn't want to work for me...
> >
> > ignore-no-display is defaulted to '() - false in this file,
> > while want-alphebetize is defaulted to 't
> >
> > bumped to 0.5.3 :)
> >
> > Thanks again,
> 
> Made some updates, and a bug fix for the alph*a*betize function, which,
> other than being spelled wrong, cut off the "Settings" menu.
> 
> I also added a function that parses out the non-regular files from the
> .desktop file list, so it wont read ~ and # files anymore.
> 
> Also, began to add a function in (parse-cat-list) to do specific things
> for specific categories, etc.
> 
> Cheers
> 
> -- 
> Mattew Love
> 

... the parse-directory-files function cuts off several *valid* files
from the list on my system. Also default-directory is already used in
sawfish i guess desktop-directory to be a better choice, also could you
make desktop-directory, ignore-no-display and want-alphabetize
changeable via .sawfishrc? I tried but somehow it failed, maybe just a
typo I oversaw, but well.

Thanks for your efforts,
Chris


_______________________________________________________________________
Sawfish rules!

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]