Referring to the new changes in the manpage.
authorphillbush <phillbush@cock.li>
Tue, 19 May 2020 08:56:06 +0000 (05:56 -0300)
committerphillbush <phillbush@cock.li>
Tue, 19 May 2020 08:56:06 +0000 (05:56 -0300)
xmenu.1
xmenu.c

diff --git a/xmenu.1 b/xmenu.1
index 0e830d2..e9500ff 100644 (file)
--- a/xmenu.1
+++ b/xmenu.1
@@ -4,6 +4,7 @@ xmenu \- menu utility for X
 .SH SYNOPSIS
 .B xmenu
 .RB [ \-w ]
 .SH SYNOPSIS
 .B xmenu
 .RB [ \-w ]
+.RI [ title... ]
 .SH DESCRIPTION
 .B xmenu
 is a menu for X,
 .SH DESCRIPTION
 .B xmenu
 is a menu for X,
@@ -35,8 +36,13 @@ An item without label is considered a separator and is drawn as a thin line in t
 separating the item above from the item below.
 .IP
 The command is the string that will be output after selecting the item.
 separating the item above from the item below.
 .IP
 The command is the string that will be output after selecting the item.
+If the item spawns a submenu, the command is the title of the menu.
 .IP
 The newline terminates the item specification.
 .IP
 The newline terminates the item specification.
+.PP
+If the argument
+.I title
+is given, the title of the menu window is set to it.
 .SH USAGE
 .B xmenu
 is controlled by the mouse,
 .SH USAGE
 .B xmenu
 is controlled by the mouse,
diff --git a/xmenu.c b/xmenu.c
index cc19921..4490b2c 100644 (file)
--- a/xmenu.c
+++ b/xmenu.c
@@ -827,6 +827,6 @@ cleanup(void)
 static void
 usage(void)
 {
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: xmenu [-w]\n");
+       (void)fprintf(stderr, "usage: xmenu [-w] title...\n");
        exit(1);
 }
        exit(1);
 }