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

Re: menu: suggestions - extending the menu files



Karl M. Hegbloom wrote:
>  It occurs to me that the menu files ought to have fields for:
> 
>  Xresources to get `xrdb -merge'd when the program is launched. (lazy eval)
>   (and removed perhaps, on the delete window hook?  Does the X server gc?)

Sounds hard to do.
 
>  Menu font, color, icon, a predicate for when it's greyed off (think scwm)

Ok, but if it's overused, it could be way ugly.
 
>  XTerm geometry and title for text apps.

We already have a title (it's the title="" flag in the menu files, which
also shows up as the xterm title.)

As for geometry, this is easy to do, just decide on a name (say, geometry=""),
and edit /etc/menu-methods/menu.h, and modify the function term() line to use
$geometry -- something like this:

function term()=\
    "xterm " ifnempty($geometry,"-geometry ") $geometry \
    " -T \"" title() "\"" ifnempty(icon()," -n " icon()) " -e " $command

The menu package is amazingly flexible. :-)
 
>  Other args to the xterm text apps run in...  ones to make menus on
>  terms that support that, perhaps....

No sure what you're getting at here..
 
>  wait="t" or wait="nil" - some programs exit after output, but I want
>  to read it first. (like how mc says push a key after it runs a cmd.)

This is a good idea, and can be implemented simalarly to my example with
geometry. Some programs already implement this themselves, but it makes
sense to put this in the menu files. For example, if we do this, pdmenu will
be able to run programs in it's "pause" mode. (But, please, not 't' or
'nil', let's use true or false; we're not all emacs fans. ;-)

Another idea, which I have been using for a while: it's possible, and
sometimes desirable to make an xterm not show up in "who", when it's running
some random program. For example, I don't want to get write messages in the 
xterm where I'm playing bsdgame's go fish (heck, I don't even want casual 
users of my system to see me playing it ;-), so it'd be nice to be able to 
pass -ut to xterm. I suggest we add a visible="" flag to the menu files, 
which if set to "false", makes xterm get -ut. 

Combining that and the geometry, I get this:

function term()=\
    "xterm " ifeq($visible,"false","-ut") \
	ifnmpty($geometry,"-geometry ") $geometry \
	" -T \"" title() "\"" ifnempty(icon()," -n " icon()) " -e " $command

Maybe if Joost isn't too busy, we'll see something similar in menu someday..

-- 
see shy jo


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: