def __init__(self, float_rules=None, no_reposition_match=None, **config): """ If you have certain apps that you always want to float you can provide ``float_rules`` to do so. ``float_rules`` is a list of dictionaries containing some or all of the keys:: {'wname': WM_NAME, 'wmclass': WM_CLASS, 'role': WM_WINDOW_ROLE} The keys must be specified as above. You only need one, but you need to provide the value for it. When a new window is opened it's ``match`` method is called with each of these rules. If one matches, the window will float. The following will float gimp and skype:: float_rules=[dict(wmclass="skype"), dict(wmclass="gimp")] Specify these in the ``floating_layout`` in your config. Floating layout will try to center most of floating windows by default, but if you don't want this to happen for certain windows that are centered by mistake, you can use ``no_reposition_match`` option to specify them and layout will rely on windows to position themselves in correct location on the screen. """ Layout.__init__(self, **config) self.clients = [] self.focused = None self.group = None self.float_rules = float_rules or DEFAULT_FLOAT_RULES self.no_reposition_match = no_reposition_match self.add_defaults(Floating.defaults)
def __init__(self, float_rules=None, **config): Layout.__init__(self, **config) self.clients = [] self.focused = None self.group = None self.no_reposition_rules = [] #useless self.add_defaults(Floating2.defaults)
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(TreeTab.defaults) self._focused = None self._panel = None self._drawer = None self._layout = None self._tree = Root(self.sections) self._nodes = {}
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(Stack.defaults) if self.num_stacks <= 0: # Catch stupid mistakes early and generate a useful message raise ValueError("num_stacks must be at least 1") self.stacks = [ _WinStack(autosplit=self.autosplit) for i in range(self.num_stacks) ]
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(Stack.defaults) self.stacks = [ _WinStack(autosplit=self.autosplit) for i in range(self.num_stacks) ] self.qtile = None self.previews = {}
def __init__(self, float_rules=None, no_reposition_rules=None, **config): """ If you have certain apps that you always want to float you can provide ``float_rules`` to do so. ``float_rules`` are a list of Match objects:: from libqtile.config import Match Match(title=WM_NAME, wm_class=WM_CLASS, role=WM_WINDOW_ROLE) When a new window is opened its ``match`` method is called with each of these rules. If one matches, the window will float. The following will float GIMP and Skype:: from libqtile.config import Match float_rules=[Match(wm_class="skype"), Match(wm_class="gimp")] Specify these in the ``floating_layout`` in your config. Floating layout will try to center most of floating windows by default, but if you don't want this to happen for certain windows that are centered by mistake, you can use ``no_reposition_rules`` option to specify them and layout will rely on windows to position themselves in correct location on the screen. """ Layout.__init__(self, **config) self.clients = [] self.focused = None self.group = None if float_rules is None: float_rules = self.default_float_rules else: warned = False for index, rule in enumerate(float_rules): if isinstance(rule, Match): continue if not warned: message = "Non-config.Match objects in float_rules are " \ "deprecated" warnings.warn(message, DeprecationWarning) logger.warning(message) warned = True match = Match(title=rule.get("wname"), wm_class=rule.get("wmclass"), role=rule.get("role"), wm_type=rule.get("wm_type"), wm_instance_class=rule.get("wm_instance_class"), net_wm_pid=rule.get("net_wm_pid")) float_rules[index] = match self.float_rules = float_rules self.no_reposition_rules = no_reposition_rules or [] self.add_defaults(Floating.defaults)
def __init__(self, float_rules: Optional[List[Match]] = None, no_reposition_rules=None, **config): """ If you have certain apps that you always want to float you can provide ``float_rules`` to do so. ``float_rules`` are a list of Match objects:: from libqtile.config import Match Match(title=WM_NAME, wm_class=WM_CLASS, role=WM_WINDOW_ROLE) When a new window is opened its ``match`` method is called with each of these rules. If one matches, the window will float. The following will float GIMP and Skype:: from libqtile.config import Match float_rules=[Match(wm_class="skype"), Match(wm_class="gimp")] The following ``Match`` will float all windows that are transient windows for a parent window: Match(func=lambda c: bool(c.is_transient_for())) Specify these in the ``floating_layout`` in your config. Floating layout will try to center most of floating windows by default, but if you don't want this to happen for certain windows that are centered by mistake, you can use ``no_reposition_rules`` option to specify them and layout will rely on windows to position themselves in correct location on the screen. """ Layout.__init__(self, **config) self.clients: List[Window] = [] self.focused = None self.group = None if float_rules is None: float_rules = self.default_float_rules self.float_rules = float_rules self.no_reposition_rules = no_reposition_rules or [] self.add_defaults(Floating.defaults)
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(Bsp.defaults) self.root = _BspNode() self.current = self.root
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(Columns.defaults) self.columns = [_Column(self.split, self.insert_position)] self.current = 0
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(Plasma.defaults) self.root = Node(None, *self.default_dimensions) self.focused = None self.add_mode = None
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(CustomStack.defaults) self.stacks = []
def __init__(self): Layout.__init__(self) self.window = None self.focused = False
def __init__(self, **config): self.layouts = {} Layout.__init__(self, **config) self.add_defaults(Slice.defaults) self._slice = Single()
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(StackTall.defaults) self.stacks = [ _WinStack(autosplit=self.autosplit) for i in range(self.num_stacks) ]
def __init__(self, **config): Layout.__init__(self, **config) self.add_defaults(MyStack.defaults) self.stacks = [ _MyWinStack(autosplit=self.autosplit, width=w) for w in self.widths ]