Notify when ram usage big
This commit is contained in:
parent
9bd287ff1c
commit
4fa769471c
@ -228,6 +228,10 @@ def monitor_stats():
|
||||
mem_values[-1] = mem_percent
|
||||
temp_values[-1] = temp_percent
|
||||
|
||||
# Notify when memory greater than 75%
|
||||
if mem_percent >= 75 and not any(map(lambda x: x > 75, mem_values[:-1])):
|
||||
subprocess.run(['notify-send', '-u', 'critical', 'High memory usage', "% 5.1f" % mem_percent + '% of RAM used'])
|
||||
|
||||
if battery is None:
|
||||
battery_json = '{"text": "", "class": "hidden"}'
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user