From 1d5f714c34d8faa35d67305aa8080b5e45f77027 Mon Sep 17 00:00:00 2001 From: Von Random Date: Mon, 10 Oct 2016 11:35:25 +0300 Subject: [PATCH] reorder things --- i3_status | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/i3_status b/i3_status index 3e53bb1..d037d4f 100755 --- a/i3_status +++ b/i3_status @@ -15,13 +15,10 @@ print('{"version":1}\n[') while True: values = list() current_time = time.strftime('%H:%M') - values.append(current_time) current_day = time.strftime('%a %d') - values.append(current_day) mem = psutil.virtual_memory() memory = 'RAM: {}% ({}G)'.format(round(100.0 - mem.percent, 2), round(mem.available / 2**30, 2)) - values.append(memory) with open('/sys/class/power_supply/BAT0/capacity', 'r') as capacity, \ open('/sys/class/power_supply/BAT0/status', 'r') as status: batt_status = status.read().strip() @@ -31,8 +28,12 @@ while True: else: batt_status = '↓' batt = 'BAT: ' + batt_capacity + '% ' + batt_status + # populate the bar values.append(batt) - values.reverse() + values.append(memory) + values.append(current_day) + values.append(current_time) + # print da shit status_print(values) time.sleep(5) print(',', end='')