From c83e627a69afdda6398872d9cd5f20eef675841e Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Mon, 3 Aug 2015 20:36:14 +0200 Subject: [PATCH] (trunk-1587) * Adjust the config section name to InactivityWatch for InactivityWatch class * Add a new setting for ActivityWatch to set the time between activty notifications --- terminatorlib/plugins/activitywatch.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/terminatorlib/plugins/activitywatch.py b/terminatorlib/plugins/activitywatch.py index 2c49e508..65b20800 100755 --- a/terminatorlib/plugins/activitywatch.py +++ b/terminatorlib/plugins/activitywatch.py @@ -23,10 +23,12 @@ except ImportError: err(_('ActivityWatch plugin unavailable: please install python-notify')) config = Config() -inactive_period = float(config.plugin_get('ActivityWatch', 'inactive_period', +inactive_period = float(config.plugin_get('InactivityWatch', 'inactive_period', 10.0)) -watch_interval = int(config.plugin_get('ActivityWatch', 'watch_interval', +watch_interval = int(config.plugin_get('InactivityWatch', 'watch_interval', 5000)) +hush_period = float(config.plugin_get('ActivityWatch', 'hush_period', + 10.0)) class ActivityWatch(plugin.MenuItem): """Add custom commands to the terminal menu""" @@ -85,7 +87,7 @@ class ActivityWatch(plugin.MenuItem): show_notify = True else: last_time = self.last_notifies[terminal] - if this_time - last_time > 10: + if this_time - last_time > hush_period: show_notify = True if show_notify == True: