From 01cde70e14b9a873a2a02f44242328843e598075 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Fri, 10 Jul 2020 17:35:40 +0200 Subject: [PATCH] improved documentation of messagereceiver module --- bumblebee_status/modules/contrib/messagereceiver.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bumblebee_status/modules/contrib/messagereceiver.py b/bumblebee_status/modules/contrib/messagereceiver.py index a202b0b..1fb8ca2 100644 --- a/bumblebee_status/modules/contrib/messagereceiver.py +++ b/bumblebee_status/modules/contrib/messagereceiver.py @@ -5,6 +5,17 @@ Displays the message that's received via unix socket. Parameteres: * messagereceiver : Unix socket address (e.g: /tmp/bumblebee_messagereceiver.sock) + +Example: + The following examples assume that /tmp/bumblebee_messagereceiver.sock is used as unix socket address. + + In order to send the string "I  bumblebee-status" to your status bar, use the following command: + echo -e '{"message":"I  bumblebee-status", "state": ""}' | socat unix-connect:/tmp/bumblebee_messagereceiver.sock STDIO + + In order to highlight the text, the state variable can be used: + echo -e '{"message":"I  bumblebee-status", "state": "warning"}' | socat unix-connect:/tmp/bumblebee_messagereceiver.sock STDIO + + """ import core.module