def swap_main(self):
        """Swap current window to main pane"""
        if self.align == self._left:
            self.swap_left()
        elif self.align == self._right:
            self.swap_right()
Swap current window to main pane
libqtile/layout/xmonad.py