nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit 1a2460b0f25e36c2451deb499a97d7ebe30084a4
parent 107e8ed8c0952644f59725fa1bf0212f2f4d1e13
Author: Eric Davis <edavis@insanum.com>
Date:   Sun, 13 Jul 2014 22:32:19 -0700

new config for changing the timeout for log messages

Diffstat:
Mconfig.py | 2++
Msncli.py | 4+++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/config.py b/config.py @@ -20,6 +20,7 @@ def __init__(self): 'cfg_editor' : 'vim', 'cfg_pager' : 'less -c', 'cfg_max_logs' : '5', + 'cfg_log_timeout' : '5', 'cfg_log_reversed' : 'yes', 'kb_help' : 'h', @@ -121,6 +122,7 @@ def __init__(self): self.configs['editor'] = [ cp.get(cfg_sec, 'cfg_editor'), 'Editor' ] self.configs['pager'] = [ cp.get(cfg_sec, 'cfg_pager'), 'External pager' ] self.configs['max_logs'] = [ cp.get(cfg_sec, 'cfg_max_logs'), 'Max logs in footer' ] + self.configs['log_timeout'] = [ cp.get(cfg_sec, 'cfg_log_timeout'), 'Log timeout' ] self.configs['log_reversed'] = [ cp.get(cfg_sec, 'cfg_log_reversed'), 'Log file reversed' ] self.keybinds = collections.OrderedDict() diff --git a/sncli.py b/sncli.py @@ -155,7 +155,9 @@ def log(self, msg): self.gui_footer_log_set(log_pile) - self.sncli_loop.set_alarm_in(5, self.log_timeout, None) + self.sncli_loop.set_alarm_in( + int(self.config.get_config('log_timeout')), + self.log_timeout, None) self.log_alarms += 1 self.log_lock.release()