From c0333b8bd91b164d452e515fb4176089823aa65a Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 1 Dec 2020 12:10:20 +0530 Subject: fixed the temperature being blank if weather stat wasn't haze; currently only supports haze and smoke --- lemonbar/sys_bar | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 lemonbar/sys_bar (limited to 'lemonbar/sys_bar') diff --git a/lemonbar/sys_bar b/lemonbar/sys_bar new file mode 100755 index 00000000..f55e26d0 --- /dev/null +++ b/lemonbar/sys_bar @@ -0,0 +1,14 @@ +#!/bin/python + +import time +import os + +def getMem(): + mem = os.popen('free -m | grep Mem').read().split() + return 'Mem: ' + str(int(int(mem[2]) / int(mem[1]) * 100)) + +print(getMem()) + +def getCPU(): + + -- cgit v1.2.3