summaryrefslogtreecommitdiff
path: root/doc/en/plugins
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-07-03 01:59:25 +0200
committerFlorent Le Coz <louiz@louiz.org>2012-07-03 01:59:25 +0200
commit4bc215806b62f687faec9f5176d717f071cc6c9f (patch)
tree38310b270e4ec1792562948560878962f678e456 /doc/en/plugins
parent737c6aae437530a0bd09852a01aabc583cc721bc (diff)
downloadpoezio-4bc215806b62f687faec9f5176d717f071cc6c9f.tar.gz
poezio-4bc215806b62f687faec9f5176d717f071cc6c9f.tar.bz2
poezio-4bc215806b62f687faec9f5176d717f071cc6c9f.tar.xz
poezio-4bc215806b62f687faec9f5176d717f071cc6c9f.zip
Improve the simple_notify plugin and the daemon to execute a command to clean the notification and to execute the remote commands through sh -c, letting us use pipes and redirections. Also adds the highlight event for plugin, and make the simple_notify plugin use it as well.
Diffstat (limited to 'doc/en/plugins')
-rw-r--r--doc/en/plugins/simple_notify.txt21
1 files changed, 19 insertions, 2 deletions
diff --git a/doc/en/plugins/simple_notify.txt b/doc/en/plugins/simple_notify.txt
index c210f703..5cadf941 100644
--- a/doc/en/plugins/simple_notify.txt
+++ b/doc/en/plugins/simple_notify.txt
@@ -17,14 +17,31 @@ default), and fill it like this:
command = notify-send -i /path/to/poezio/data/poezio_80.png "New message from %(from)s" "%(body)s"
---------------------------------------------------------------------
-You can put any command, instead of this one. You can also use the
+[source,conf]
+---------------------------------------------------------------------
+[simple_notify]
+command = echo %{from}s\> %{body}s >> some.fifo
+delay = 3
+after_command echo = >> some.fifo
+---------------------------------------------------------------------
+
+You can put any command, instead of these ones. You can also use the
special keywords _%(from)s_ and _%(body)s_ that will be replaced
directly in the command line by the author of the message, and the body.
-The example shown above will display something like this:
+The first example shown above will display something like this:
image:../../images/simple_notify_example.png["Simple notify example",
title="Simple notify example"]
+The second example will first write the author and the message in a
+fifo, that fifo can locally be read by some other program (was tested
+with the xmobar PipeReader command, which displays what is read from a
+fifo into a status bar. Be careful, you have two different fifos in
+that case, don’t get confused). The delay and command_after options
+are used to erase/delete/kill the notification after a certain
+delay. In our example it is used to display an empty message in our
+xmobar, erasing the notification after 3 seconds.
+
NOTE: If you set the _exec_remote_ option to _true_ into the
link:../configure.html[main configuration file], the command will be executed
remotely (as explained in the link:link.html[/link help]).