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
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
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
def info(self): d = Layout.info(self) d["clients"] = [c.name for c in self.clients] return d
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
def info(self): d = Layout.info(self) for layout in self._get_layouts(): d[layout.name] = layout.info() return d
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