(self, _vte, terminal)
return True
Notify that a terminal did something
Notify that a terminal did something
Notify that a terminal did something
def notify(self, _vte, terminal):
        """Notify that a terminal did something"""
        show_notify = False

        # Don't notify if the user is already looking at this terminal.
        if terminal.vte.has_focus():
            return True

        note = Notify.Notification.new(_('Terminator'), _('Activity in: %s') % 
                                  terminal.get_window_title(), 'terminator')

        this_time = time.mktime(time.gmtime())
        if terminal not in self.last_notifies:
            show_notify = True
        else:
            last_time = self.last_notifies[terminal]
            if this_time - last_time > hush_period:
                show_notify = True

        if show_notify == True:
            note.show()
            self.last_notifies[terminal] = this_time

        return True
def notify ( self , _vte , terminal ) : show_notify = False # Don't notify if the user is already looking at this terminal. if terminal . vte . has_focus ( ) : return True note = Notify . Notification . new ( _ ( 'Terminator' ) , _ ( 'Activity in: %s' ) % terminal . get_window_title ( ) , 'terminator' ) this_time = time . mktime ( time . gmtime ( ) ) if terminal not in self . last_notifies : show_notify = True else : last_time = self . last_notifies [ terminal ] if this_time - last_time > hush_period : show_notify = True if show_notify == True : note . show ( ) self . last_notifies [ terminal ] = this_time return True