]> git.sur5r.net Git - i3/i3status/blobdiff - man/i3status.man
Added function to print content from file (#331)
[i3/i3status] / man / i3status.man
index 4bc7d0aecb5817778838483bf6fc98356445c2ae..70ba71a90938bca805833ee70be14dd90a1ad320 100644 (file)
@@ -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