]> git.mdlowis.com Git - proto/labwc.git/commit
config: add `<core><promptCommand>`
authorJohan Malm <jgm323@gmail.com>
Mon, 22 Sep 2025 17:32:42 +0000 (18:32 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 24 Sep 2025 19:13:51 +0000 (20:13 +0100)
commit57655866365c4422c8f3352960c0ccc088d27bce
tree3cc6b24dba6a1e1c67e8f28766cef543c7ccbbd0
parent7028e65154058afac01f77226e351332b1b669ec
config: add `<core><promptCommand>`

...to enable configuration of the action prompt command.

Also set some better defaults for labnag.

The new default command is:

    labnag \
        --message '%m' \
        --button-dismiss '%n' \
        --button-dismiss '%y' \
        --background '%b' \
        --text '%t' \
        --border '%t' \
        --border-bottom '%t' \
        --button-background '%b' \
        --button-text '%t' \
        --border-bottom-size 1 \
        --button-border-size 3 \
        --timeout 0

...where the conversion specifiers are defined as follows:

    %m: the `<prompt>` message option
    %n: _("No")
    %y: _("Yes")
    %b: osd.bg.color
    %t: osd.label.text.color

This config options also enables the use of a different dialog client, for
example like this:

    <core>
      <promptCommand>zenity --question --text="%m"</promptCommand>
    </core>
docs/rc.xml.all
include/action-prompt-command.h [new file with mode: 0644]
include/action.h
include/common/buf.h
include/config/rcxml.h
src/action-prompt-command.c [new file with mode: 0644]
src/action.c
src/common/buf.c
src/config/rcxml.c
src/meson.build