def swap_split(self): """Swap split type on focused window. """ hwnd = window_api.get_foreground_window() node = self.findNode(hwnd, self.desktop.root) if node: if node.parent: node.parent.split = node.parent.split.swap() else: node.split = node.split.swap() self.desktop.update_all(self.desktop.root)
def remove(self): """Tells desktop to remove focused window. """ focused = window_api.get_foreground_window()
def insert(self): """Tells desktop to insert focused window. """ focused = window_api.get_foreground_window() self.desktop.insert(focused)