libqtile/layout/tree.py
def add(self, win, hint=None):
        """Add a new window

        Adds a new `Window` to the tree.  The location of the new node is
        controlled by looking:

            * `hint` kwarg - place the node next to this node
            * win.tree_section - place the window in the given section, by name
            * default section - fallback to default section (first section, if
              not otherwise set)
        """
        parent = None

        if hint is not None:
            parent = hint.parent

        if parent is None:
            sect = getattr(win, 'tree_section', None)
            if sect is not None:
                parent = self.sections.get(sect)

        if parent is None:
            parent = self.def_section

        node = Window(win)
        parent.add(node, hint=hint)
        return node
Add a new window

        Adds a new `Window` to the tree.  The location of the new node is
        controlled by looking:

            * `hint` kwarg - place the node next to this node
            * win.tree_section - place the window in the given section, by name
            * default section - fallback to default section (first section, if
              not otherwise set)
        
Add a new window
Adds a new `Window` to the tree.  The location of the new node is
controlled by looking.

`hint` kwarg - place the node next to this node
win.tree_section - place the window in the given section, by name
default section - fallback to default section (first section, if
not otherwise set)
Add a new window Adds a new ` Window ` to the tree . The location of the new node is controlled by looking . ` hint ` kwarg - place the node next to this node win . tree_section - place the window in the given section by name default section - fallback to default section ( first section if not otherwise set )
def add(self, win, hint=None):
        parent = None
        if hint is not None:
            parent = hint.parent
        if parent is None:
            sect = getattr(win, 'tree_section', None)
            if sect is not None:
                parent = self.sections.get(sect)
        if parent is None:
            parent = self.def_section
        node = Window(win)
        parent.add(node, hint=hint)
        return node
def add ( self , win , hint = None ) : parent = None if hint is not None : parent = hint . parent if parent is None : sect = getattr ( win , 'tree_section' , None ) if sect is not None : parent = self . sections . get ( sect ) if parent is None : parent = self . def_section node = Window ( win ) parent . add ( node , hint = hint ) return node
Add a new window
Adds a new `Window` to the tree.
Add a new window Adds a new ` Window ` to the tree .
"""Add a new window

        Adds a new `Window` to the tree.  The location of the new node is
        controlled by looking:

            * `hint` kwarg - place the node next to this node
            * win.tree_section - place the window in the given section, by name
            * default section - fallback to default section (first section, if
              not otherwise set)
        """
self
win
hint