(self, widget, vertical=True, cwd=None, sibling=None, widgetfirst=True)
Split the window
Split the window
Split the window
def split_axis(self, widget, vertical=True, cwd=None, sibling=None, widgetfirst=True):
        """Split the window"""
        if self.is_zoomed():
            self.unzoom()
            widget.get_parent().split_axis(widget, vertical, cwd, sibling, widgetfirst)
            return

        order = None
        maker = Factory()
        self.remove(widget)

        if vertical:
            container = maker.make('VPaned')
        else:
            container = maker.make('HPaned')
        
        self.set_pos_by_ratio = True

        if not sibling:
            sibling = maker.make('Terminal')
            sibling.set_cwd(cwd)
            if self.config['always_split_with_profile']:
                sibling.force_set_profile(None, widget.get_profile())
            sibling.spawn_child()
            if widget.group and self.config['split_to_group']:
                sibling.set_group(None, widget.group)
        elif self.config['always_split_with_profile']:
            sibling.force_set_profile(None, widget.get_profile())

        self.add(container)
        container.show_all()

        order = [widget, sibling]
        if widgetfirst is False:
            order.reverse()

        for term in order:
            container.add(term)
        container.show_all()
        
        while Gtk.events_pending():
            Gtk.main_iteration_do(False)
        sibling.grab_focus()
        self.set_pos_by_ratio = False
def split_axis ( self , widget , vertical = True , cwd = None , sibling = None , widgetfirst = True ) : if self . is_zoomed ( ) : self . unzoom ( ) widget . get_parent ( ) . split_axis ( widget , vertical , cwd , sibling , widgetfirst ) return order = None maker = Factory ( ) self . remove ( widget ) if vertical : container = maker . make ( 'VPaned' ) else : container = maker . make ( 'HPaned' ) self . set_pos_by_ratio = True if not sibling : sibling = maker . make ( 'Terminal' ) sibling . set_cwd ( cwd ) if self . config [ 'always_split_with_profile' ] : sibling . force_set_profile ( None , widget . get_profile ( ) ) sibling . spawn_child ( ) if widget . group and self . config [ 'split_to_group' ] : sibling . set_group ( None , widget . group ) elif self . config [ 'always_split_with_profile' ] : sibling . force_set_profile ( None , widget . get_profile ( ) ) self . add ( container ) container . show_all ( ) order = [ widget , sibling ] if widgetfirst is False : order . reverse ( ) for term in order : container . add ( term ) container . show_all ( ) while Gtk . events_pending ( ) : Gtk . main_iteration_do ( False ) sibling . grab_focus ( ) self . set_pos_by_ratio = False