From 9492a517a88251726f77887c4349b279ae89546e Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Thu, 12 Dec 2019 15:53:46 -0500 Subject: Refine menu README text a little --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5fd363d..84697fd 100644 --- a/README.md +++ b/README.md @@ -47,21 +47,24 @@ Quoted strings are terminated by a matching quote at the end of a line to continue a quoted string, prefix it with a `\`. The m(enu) command uses `,` as a delimiter between label and command and -`|` as a delimiter between entries (label+command).If you want to use -these 2 characters in a label or command, you have to escape them with -`\`. If you want to have an entry with just a label and no command to be -executed, you can omit the `,` part. If you want an empty label -(e.g. as a separator), you can just add a second `|` delimiter after the -previous one. If you want a command to be executed upon selection of an -empty label, you can add `,` after the previous `|`. - -Example command: +`|` as a delimiter between entries (label+command). If you want to use +these two characters in a label or command, you have to escape them with +`\`. You can make a blank label or a label without an action by leaving +out the `label` or `cmd` respectively. For example: ```console $ echo "m Browser,firefox|Terminal,xterm|Label-only||,chromium" > /tmp/test $ # (where `mkfifo /tmp/test` has been executed before) ``` +Would give you a menu with five entries: + + - "Browser", which launches `firefox` when clicked + - "Terminal", which launches `xterm` when clicked + - "Label-only", which does nothing if clicked + - An unlabeled, inactive entry (useful as a separator) + - An unlabeled entry which launches `chromium` when clicked + ## Why? Because I wanted to be able to create tray icons from bash without all -- cgit