[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] "Applications Menu" contrib module
From: |
Ben Spencer |
Subject: |
Re: [STUMP] "Applications Menu" contrib module |
Date: |
Mon, 30 May 2011 10:25:45 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, May 06, 2011 at 06:18:07PM -0500, Krzysztof Drewniak wrote:
> I've created a contrib module that adds and "Applications" menu (on the
> command show-menu). The entries for the menu can either be stored in
> menu file(s) and loaded (such as from a .stumpwmrc) or added manually at
> the REPL. The patch also includes an /etc/menu-methods script for Debian
> (and derivatives) that allows you to generate your menu file
> automatically.
Hi Krzysztof,
I think this could be simplified quite a bit if we used install-menu
to generate alists directly, eg something like this:
treewalk="(M)"
startmenu= nstring(level(), " ") "(\"" $title "\" .\n"
endmenu= nstring(level(), " ") ")\n"
supported
x11= nstring(level(), " ") "(\"" title() "\" . \"" esc($command, "\"")
"\")\n"
text= nstring(level(), " ") "(\"" title() "\" . \"" esc(term(), "\"")
"\")\n"
endsupported
This outputs:
("Debian" .
("Applications" .
("Accessibility" .
("Xmag" . "xmag")
)
("Data Management" .
("DataManager" . "DataManager")
("LibreOffice Base" . "/usr/bin/libreoffice -base")
("pgAdmin III" . "/usr/bin/pgadmin3")
)
...
Ben