From 4fa769471cbc573edf88f4716d6ba93d7cbcb91d Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 9 Jan 2026 09:38:41 +0100 Subject: [PATCH] Notify when ram usage big --- hyprscript | 4 ++++ 1 file changed, 4 insertions(+) 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: