Dynamic menu text?
"Thomas E. Kammeyer" <[email protected]> Wed, 8 Apr 2026 17:00:52 -0500
| Newsgroups | gmane.comp.window-managers.ctwm |
|---|---|
| Message-ID | <20260408170052.0011311e@7k4mm3y3r> |
Hello folks,
Apologies if this has been considered before, and especially if it's
implemented and I missed it in docs.
I was wondering if consideration has ever been given to allowing a
leading "!" on menu entry text to cause ctwm to display the output of a
command (subject to limitations like some max. #chars and ending
regardless at, say, \r or \n)?
Note that I'm talking about the text displayed when the menu is pulled
down / displayed and not the menu entry action (where a lead '!'
already has a meaning as a short form of f.exec).
So a menu might look like (this is edited down for brevity but based on
something in my rc file):
menu "defops" {
"My menu example" f.title
"!date" f.nop
"Identify" f.identify
"Iconify" f.iconify
"Resize" f.resize
"Move" f.move
}
The "!date" entry would run the "date" command when the menu was
being displayed and, at run time, display the current date and time at
the top of the menu. The action could be replaced by something that
cuts the date and time to the clipboard as well but that's already
doable so I'm not discussing it further here.
This would be useful to me because I run a _very_ uncluttered desktop
and I dislike having the clock hanging out on the desktop anyway... OK,
there are other ways of not seeing the time all the, er, time.
This seems like it might have other uses... though I admit it raises
implementation issues for sure and abuse potential would need to be
controlled.
Has this ever been considered?
Thanks,
-Thomas K