aboutsummaryrefslogtreecommitdiffstats
path: root/examples/plugin-test
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-28 21:45:59 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-28 21:45:59 +0100
commit34b3db242f9076d68f20fdeb188836dee690d9a3 (patch)
tree5da7ee658abd3f67b95a04dda14e49ec6e021f85 /examples/plugin-test
parentfix special chars (diff)
downloadxpybar-34b3db242f9076d68f20fdeb188836dee690d9a3.tar.gz
xpybar-34b3db242f9076d68f20fdeb188836dee690d9a3.tar.bz2
xpybar-34b3db242f9076d68f20fdeb188836dee690d9a3.tar.xz
add spawn_read
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--examples/plugin-test6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/plugin-test b/examples/plugin-test
index 214449a..db316ee 100644
--- a/examples/plugin-test
+++ b/examples/plugin-test
@@ -41,7 +41,9 @@ def redraw():
users = ['%s{%i}' % (colour_user(u) % u, len(users_[u])) for u in users_.keys()]
users = 'Users: %s' % (' '.join(users))
- text = '%s │ %s │ %s │ %s'
- text %= (uptime, idle, loadavg, users)
+ time = spawn_read('date', '+%Y-(%m)%b-%d %T, %a w%V, %Z')
+
+ text = '%s │ %s │ %s │ %s │ %s'
+ text %= (time, uptime, idle, loadavg, users)
bar.draw_coloured_text(0, 10, 0, 2, text)