From 3c29c1515823f3011bb97c37c9ad86043560f890 Mon Sep 17 00:00:00 2001 From: Alexey Avramov Date: Sat, 15 Dec 2018 00:52:49 +0900 Subject: [PATCH] fix readme --- README.md | 2 +- nohang | 2 +- nohang.conf | 4 ++-- nohang_notify_low_mem | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e00b756..037c9ac 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Nohang is a highly configurable daemon for Linux which is able to correctly prevent [out of memory](https://en.wikipedia.org/wiki/Out_of_memory) (OOM) and keep system responsiveness in low memory conditions. -![pic](https://i.imgur.com/Ky5hEOb.png) +![pic](https://i.imgur.com/DmqFxaB.png) ## What is the problem? diff --git a/nohang b/nohang index d22df5c..fc5eaa3 100755 --- a/nohang +++ b/nohang @@ -298,7 +298,7 @@ def send_notify(signal, name, pid): username, display_env, dbus_env = i[0], i[1], i[2] Popen(['sudo', '-u', username, 'env', display_env, dbus_env, 'notify-send', '--icon=dialog-warning', - '{}'.format(title), '{}'.format(body)]) + '{}'.format(title), '{}'.format(body)]).wait(9) else: # send notification to user that runs this nohang Popen(['notify-send', '--icon=dialog-warning', diff --git a/nohang.conf b/nohang.conf index ccb4b69..66f99c4 100644 --- a/nohang.conf +++ b/nohang.conf @@ -234,12 +234,12 @@ $ETC foo /// exit 0 See also wiki.archlinux.org/index.php/Desktop_notifications Valid values are True and False. -gui_notifications = False +gui_notifications = True Enable GUI notifications about the low level of available memory. Valid values are True and False. -gui_low_memory_warnings = False +gui_low_memory_warnings = True Минимальное время между отправками уведомлений в секундах. Valid values are floating-point numbers from the range [1; 300]. diff --git a/nohang_notify_low_mem b/nohang_notify_low_mem index 11484e2..57c5f8b 100755 --- a/nohang_notify_low_mem +++ b/nohang_notify_low_mem @@ -103,6 +103,6 @@ if len(b) > 0: '{}'.format(title), '{}'.format(body) ], env={ display_key: display_value, dbus_key: dbus_value - }) + }).wait(9) else: print('Low memory warnings: nobody logged in with GUI. Nothing to do.')