fix GUI notifications

This commit is contained in:
Alexey Avramov 2019-02-12 02:48:08 +09:00
parent 9b077bbd55
commit 5f211d765b

10
nohang
View File

@ -377,7 +377,7 @@ def send_notify_warn():
# title = 'Low memory: {}'.format(low_mem_percent) # title = 'Low memory: {}'.format(low_mem_percent)
title = 'Low memory' title = 'Low memory'
body = 'Hog: <b>{}</b>, PID: {}'.format( body = 'Next victim: {}[{}]'.format(
name.replace( name.replace(
# symbol '&' can break notifications in some themes, # symbol '&' can break notifications in some themes,
# therefore it is replaced by '*' # therefore it is replaced by '*'
@ -401,8 +401,8 @@ def send_notify(signal, name, pid):
name: str process name name: str process name
pid: str process pid pid: str process pid
""" """
title = 'Hang prevention' title = 'Freeze prevention'
body = '<b>{} {}</b>, PID: {}'.format( body = '{} {}[{}]'.format(
notify_sig_dict[signal], notify_sig_dict[signal],
name.replace( name.replace(
# symbol '&' can break notifications in some themes, # symbol '&' can break notifications in some themes,
@ -426,8 +426,8 @@ def send_notify_etc(pid, name, command):
name: str process name name: str process name
pid: str process pid pid: str process pid
""" """
title = 'Hang prevention' title = 'Freeze prevention'
body = 'Victim is process <b>{}</b>, {}\nExecute the command:\n<b>{}</b>'.format( body = 'Victim is {}[{}]\nExecute the command:\n<b>{}</b>'.format(
name.replace('&', '*'), name.replace('&', '*'),
pid, pid,
command.replace('&', '*') command.replace('&', '*')