fix readme

This commit is contained in:
Alexey Avramov 2018-12-15 00:52:49 +09:00
parent 94646398d6
commit 3c29c15158
4 changed files with 5 additions and 5 deletions

View File

@ -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?

2
nohang
View File

@ -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',

View File

@ -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].

View File

@ -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.')