Patch from Chris Newton to not notify on activity in the active terminal. Fixes LP#748681
This commit is contained in:
parent
f0fc69f011
commit
0ebfed1a12
@ -65,6 +65,10 @@ class ActivityWatch(plugin.MenuItem):
|
||||
"""Notify that a terminal did something"""
|
||||
show_notify = False
|
||||
|
||||
# Don't notify if the user is already looking at this terminal.
|
||||
if terminal.vte.flags() & gtk.HAS_FOCUS:
|
||||
return True
|
||||
|
||||
note = pynotify.Notification('Terminator', 'Activity in: %s' %
|
||||
terminal.get_window_title(), 'terminator')
|
||||
|
||||
@ -80,7 +84,7 @@ class ActivityWatch(plugin.MenuItem):
|
||||
note.show()
|
||||
self.last_notifies[terminal] = this_time
|
||||
|
||||
return(True)
|
||||
return True
|
||||
|
||||
class InactivityWatch(plugin.MenuItem):
|
||||
"""Add custom commands to notify when a terminal goes inactive"""
|
||||
|
Loading…
Reference in New Issue
Block a user