]> git.sur5r.net Git - i3/i3status/blobdiff - man/i3status.man
Added function to print content from file (#331)
[i3/i3status] / man / i3status.man
index 7d27ae32ad043ecb8c74bd3671ba33ae86296f69..70ba71a90938bca805833ee70be14dd90a1ad320 100644 (file)
@@ -97,6 +97,7 @@ path_exists VPN {
 
 tztime local {
         format = "%Y-%m-%d %H:%M:%S"
+        hide_if_equals_localtime = true
 }
 
 tztime berlin {
@@ -122,6 +123,11 @@ memory {
 disk "/" {
        format = "%free"
 }
+
+read_file uptime {
+       path = "/proc/uptime"
+}
+
 -------------------------------------------------------------
 
 === General
@@ -514,6 +520,8 @@ Files below that path make for valid timezone strings, e.g. for
 +/usr/share/zoneinfo/Europe/Berlin+ you can set timezone to +Europe/Berlin+
 in the +tztime+ module.
 To override the locale settings of your environment, set the +locale+ option.
+To display time only when the set timezone has different time from localtime, set
++hide_if_equals_localtime+ to true.
 
 *Example order*: +tztime berlin+
 
@@ -533,6 +541,7 @@ tztime berlin {
        format = "<span foreground='#ffffff'>time:</span> %time"
        format_time = "%H:%M %Z"
        timezone = "Europe/Berlin"
+       hide_if_equals_localtime = true
 }
 -------------------------------------------------------------
 
@@ -577,9 +586,9 @@ to "default", PulseAudio will be tried if detected and will fallback to ALSA
 
 *Example order*: +volume master+
 
-*Example format*: +♪: %volume+
+*Example format*: +♪ (%devicename): %volume+
 
-*Example format_muted*: +♪: 0%%+
+*Example format_muted*: +♪ (%devicename): 0%%+
 
 *Example configuration*:
 -------------------------------------------------------------
@@ -607,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