예제 #1
0
 def info(self):
     d = Layout.info(self)
     d["clients"] = []
     d["columns"] = []
     for c in self.columns:
         cinfo = c.info()
         d["clients"].extend(cinfo['clients'])
         d["columns"].append(cinfo)
     d["current"] = self.current
     return d
예제 #2
0
    def info(self):
        def show_section_tree(root):
            """
            Show a section tree in a nested list, whose every element has the form:
            `[root, [subtrees]]`.

            For `[root, [subtrees]]`, The first element is the root node, and the second
            is its a list of its subtrees.  For example, a section with below windows
            hierarchy on the panel:

            - a
              - d
                - e
              - f
            - b
              - g
              - h
            - c

            will return [
                         [a,
                           [d, [e]],
                           [f]],
                         [b, [g], [h]],
                         [c],
                        ]
            """
            tree = []
            if isinstance(root, Window):
                tree.append(root.window.name)
            if root.expanded and root.children:
                for child in root.children:
                    tree.append(show_section_tree(child))
            return tree

        d = Layout.info(self)
        d["clients"] = sorted([x.name for x in self._nodes])
        d["sections"] = [x.title for x in self._tree.children]

        trees = {}
        for section in self._tree.children:
            trees[section.title] = show_section_tree(section)
        d["client_trees"] = trees
        return d
예제 #3
0
 def info(self):
     d = Layout.info(self)
     d["clients"] = [x.name for x in self._nodes]
     d["sections"] = [x.title for x in self._tree.children]
     return d
예제 #4
0
파일: floating.py 프로젝트: tusqasi/qtile
 def info(self):
     d = Layout.info(self)
     d["clients"] = [c.name for c in self.clients]
     return d
예제 #5
0
 def info(self):
     d = Layout.info(self)
     d["stacks"] = [i.info() for i in self.stacks]
     d["current_stack"] = self.current_stack_offset
     d["clients"] = [c.name for c in self.clients]
     return d
예제 #6
0
파일: slice.py 프로젝트: veezart/qtile
 def info(self):
     d = Layout.info(self)
     for layout in self._get_layouts():
         d[layout.name] = layout.info()
     return d
예제 #7
0
 def info(self):
     d = Layout.info(self)
     d["rectangles"] = [rect for rect in self.rectangles]
     d["focused"] = self.focused
     d["clients"] = [x.name for x in self.clients]
     return d