summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorDennis Vesterlund <dennisvesterlund@gmail.com>2019-02-21 15:34:32 +0100
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2019-02-21 15:34:32 +0100
commit9b5f6ae5f460c8642286cf174751a317f155d043 (patch)
tree802a6ca40521ffddffe91fcab5d4a50f67fdd8f2 /man
parent9d28a661a72cd118448e92c30a35b98100aa57bf (diff)
Added function to print content from file (#331)
Added a function to print file contents to status bar without newlines. Added tests for print file contents function Added manpage entry for file contents
Diffstat (limited to 'man')
-rw-r--r--man/i3status.man24
1 files changed, 24 insertions, 0 deletions
diff --git a/man/i3status.man b/man/i3status.man
index 4bc7d0a..70ba71a 100644
--- a/man/i3status.man
+++ b/man/i3status.man
@@ -123,6 +123,11 @@ memory {
disk "/" {
format = "%free"
}
+
+read_file uptime {
+ path = "/proc/uptime"
+}
+
-------------------------------------------------------------
=== General
@@ -611,6 +616,25 @@ volume master {
}
-------------------------------------------------------------
+=== File Contents
+
+Outputs the contents of the specified file. You can use this to check contents
+of files on your system, for example /proc/uptime. By default the function only
+reads the first 254 characters of the file, if you want to override this set
+the Max_characters option. It will never read beyond the first 4095 characters.
+If the file is not found "no file" will be printed, if the file can't be read
+"error read" will be printed.
+
+*Example order*: read_file UPTIME
+
+*Example format*: "%title: %content"
+
+*Example format_bad*: "%title - %errno: %error"
+
+*Example path*: "/proc/uptime"
+
+*Example Max_characters*: 255
+
== Universal module options
When using the i3bar output format, there are a few additional options that