From a93755b2d1e9efbd63723f5302ca7c8f43521aa8 Mon Sep 17 00:00:00 2001 From: Will Song Date: Sat, 16 Jul 2016 16:15:33 -0500 Subject: Add expandEnv function and use it in PipeReader family of monitors expandEnv takes a string and expands the environment variables it can find. variable substringing (e.g. ${VAR:1} to lop off the first character) is not supported, but $VAR and ${VAR} formats are, with the former being delimited by punctuation, but not underscores. --- readme.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 93469e2..39f3d29 100644 --- a/readme.md +++ b/readme.md @@ -1348,6 +1348,7 @@ can be used in the output template as `%mydate%` - Reads its displayed output from the given pipe. - Prefix an optional default text separated by a colon +- Expands environment variables in the first argument of syntax '${VAR}' or '$VAR' **`MarqueePipeReader "default text:/path/to/pipe" (length, rate, sep) Alias`** @@ -1357,6 +1358,8 @@ can be used in the output template as `%mydate%` Run MarqueePipeReader "/tmp/testpipe" (10, 7, "+") "mpipe" +- Expands environment variables in the first argument + **`BufferedPipeReader Alias [(Timeout, Bool, "/path/to/pipe1"), ..]`** @@ -1386,6 +1389,7 @@ can be used in the output template as `%mydate%` `"/tmp/xmobar_status"` will reveal xmonad for 1.5 seconds and temporarily overwrite the window titles. - Take a look at [samples/status.sh] +- Expands environment variables for the pipe path [samples/status.sh]: http://github.com/jaor/xmobar/raw/master/samples/status.sh -- cgit v1.2.3