blob: fda91aa23e1a877b1df09f875089d48bcad73f81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# -*- python -*-
# A simple xpybar configuration example that tests the plugins
from plugins.uptime import Uptime
OUTPUT, HEIGHT, YPOS, TOP = 0, 24, 24, True
def redraw():
bar.clear()
uptime_ = Uptime()
uptime = '%id %02i:%02i:%0.2f' % uptime_.uptime
tot_idle = '%id %02i:%02i:%0.2f' % uptime_.total_idle
avg_idle = '%id %02i:%02i:%0.2f' % uptime_.average_idle
text = 'Uptime: %s │ Idle time: %s %s'
text %= (uptime, tot_idle, avg_idle)
bar.draw_coloured_text(0, 10, 0, 2, text)
|