summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorCharalampos Kardaris <ckardaris@outlook.com>2019-12-03 15:25:54 +0200
committerCharalampos Kardaris <ckardaris@outlook.com>2019-12-03 15:25:54 +0200
commit4c4ae412ddd1507848fe0cc45045425f01669580 (patch)
tree87c0800989612c31df8420bc2d7b8f9600b1e451 /README.md
parentMerge pull request #6 from jonhoo/newline-handling (diff)
downloadmktrayicon-4c4ae412ddd1507848fe0cc45045425f01669580.tar.gz
mktrayicon-4c4ae412ddd1507848fe0cc45045425f01669580.tar.bz2
mktrayicon-4c4ae412ddd1507848fe0cc45045425f01669580.zip
Added missing popup menu functionality
The existing code had this functionality planned but not implemented. I tried my best to make it work and I updated the README file with instructions on how to use it.
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index f5e97d6..d4fe5bb 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,9 @@ are supported:
- `c <cmnd>`: Set the command to be execute when the user clicks the icon
(`cmnd` is passed to `/bin/sh -c`)
- `c`: Remove the click handler
+ - `m <label1>,<cmd1>|<label2>,<cmd2>|...`: Set the labels and the corresponding commands to be executed when the user opens the icon menu (right-click usually)
+ (`cmd#` is passed to `/bin/sh -c`)
+ - `m`: Remove the menu handler
- `h`: Hide the tray icon
- `s`: Show the tray icon
@@ -39,6 +42,12 @@ Quoted strings are terminated by a matching quote at the end of a line
(ignoring whitespace). To escape a quote character 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 `\`.
+
+Example command: `echo "m Browser,firefox|Terminal,xterm" > /tmp/test` (where `mkfifo /tmp/test` has been executed before)
+
## Why?
Because I wanted to be able to create tray icons from bash without all the
bgstack15