fix readme
This commit is contained in:
parent
94646398d6
commit
3c29c15158
@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
## What is the problem?
|
||||
|
||||
|
2
nohang
2
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',
|
||||
|
@ -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].
|
||||
|
@ -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.')
|
||||
|
Loading…
Reference in New Issue
Block a user