diff --git a/hyprscript b/hyprscript index 5c9ed19..7d73961 100755 --- a/hyprscript +++ b/hyprscript @@ -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: