]> git.mdlowis.com Git - proto/labwc.git/commitdiff
labwc-config(5): document <promptCommand>
authorJohan Malm <jgm323@gmail.com>
Tue, 23 Sep 2025 18:26:52 +0000 (19:26 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 24 Sep 2025 19:13:51 +0000 (20:13 +0100)
docs/labwc-config.5.scd

index 7ddf2d5bd06bbb38a050f43bb3966294285c707e..52cd96382bfb9186569e2c35372997a9776d8689 100644 (file)
@@ -179,6 +179,7 @@ this is for compatibility with Openbox.
   <reuseOutputMode>no</reuseOutputMode>
   <xwaylandPersistence>no</xwaylandPersistence>
   <primarySelection>yes</primarySelection>
+  <promptCommand>[see details below]</promptCommand>
 </core>
 ```
 
@@ -265,6 +266,53 @@ this is for compatibility with Openbox.
        up/down) in Chromium and electron based clients without inadvertantly
        pasting the primary clipboard. Default is yes.
 
+*<core><promptCommand>*
+       Set command to be invoked for an action prompt (*<action><prompt>*)
+
+       The following conversion specifiers are supported:
+       - *%m*: the *<prompt>* message option
+       - *%n*: "No" (in local language if translation is available)
+       - *%y*: "Yes" (in local language if translation is available)
+       - *%b*: osd.bg.color
+       - *%t*: osd.label.text.color
+
+       The default prompt 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
+       ```
+
+       Example 1: The prompt can be configured to use a different dialog client
+
+       ```
+       <core>
+         <promptCommand>zenity --question --text="%m"</promptCommand>
+       </core>
+       ```
+
+       Example 2: A more complex zenity command could be used:
+
+       ```
+       zenity \\
+               --question \\
+               --title="" \\
+               --text="%m" \\
+               --ok-label="%y" \\
+               --cancel-label="%n"
+       ```
+
 ## PLACEMENT
 
 ```