It seems the message formatting has been altered.

See the doc here: https://github.com/maxatome/ctwm-mirror/commit/8d7f5d43ed0c1a21313c0e36bfc35d81410a796b#diff-026da8e81158e5ab5e436f732837290bf316912d36359ece9ec138ac29da5bd5R2526

++

Max.

Le 12/02/2023 à 23:34, Maxime Soulé a écrit :

Hi,

I just implemented a new f.dynmenu function.

The doc says:

f.dynmenu |string|

    This function invokes a menu created dynamically by the execution
    of the argument |string| passed to |/bin/sh|. On stdout of this
    execution, the definition of one or several menu items is expected:

    |"item1" [ ("fg1":"bg1") ] function1 "item2" [ ("fg2":"bg2") ]
    function2 . . . "itemN" [ ("fgN":"bgN") ] functionN|

    Example of use:

    |f.dynmenu "/usr/local/bin/mymenu.sh"|

    with |/usr/local/bin/mymenu.sh| defined as:

    |#!/bin/sh cat <<EOF "$(hostname)" f.title "*$(date)" !"daemon
    xterm" "Details..." f.dynmenu "/usr/local/bin/another_menu.sh"
    "Shutdown" ("white":"red") !"shutdown -r now" EOF|

    Note that the script is launched every times |f.dynmenu| is
    invoked. The result is not cached. So if |mymenu.sh| content
    changes at runtime, the resulting menu entries change at the next
    |f.dynmenu| invocation.

It seems to work well, without any memory leak observed. Feel free to test it: https://github.com/maxatome/ctwm-mirror/tree/dynmenu

Any remarks are welcome!

++

Max.

Reply via email to