aboutsummaryrefslogtreecommitdiff
path: root/lemonbar/sys_bar
blob: f55e26d0da4b102085624d8081e6bb064daff75d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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():