On Wed, Dec 16, 2020 at 11:03:54PM +0000, Justine Smithies wrote:
> Could someone help me with groups and matches please ? I think i understand
> that the matches rule should allow me to open an application in a certain
> group but using the code below it does not seem to work and I get the
> following errors in the log.
> 
> workspaces = [
>     {"name": " Home", "key": "1", "matches": [Match(wm_class=["Pidgin"])]},
>     {"name": " Dev", "key": "2", "matches": [Match(wm_class=["Navigator",
> "firefox"])]},
>     {"name": " Chat", "key": "3", "matches": [Match(wm_class=["dolphin",
> "Thunar", "File-roller"])]},
>     {"name": " GFX", "key": "4", "matches": [Match(wm_class=["Lispworks",
> "jetbrains-pycharm", "Eclipse" ])]},
>     {"name": "阮 Music", "key": "5", "matches": [Match(wm_class=["Acroread",
> "Zathura", "Evince"])]},
> ]
> 
> groups = []
> for workspace in workspaces:
>     matches = workspace["matches"] if "matches" in workspace else None
>     groups.append(Group(workspace["name"], matches=matches,
> layout="monadtall"))
>     keys.append(Key([mod], workspace["key"],
> lazy.group[workspace["name"]].toscreen()))
>     keys.append(Key([mod, "shift"], workspace["key"],
> lazy.window.togroup(workspace["name"])))
> 
> Errors in log file:
> 2020-12-16 23:03:02,725 ERROR libqtile hook.py:fire():L385 Error in hook
> client_new
> Traceback (most recent call last):
>   File "/usr/lib/python3.9/site-packages/libqtile/hook.py", line 383, in
> fire
>     i(*args, **kwargs)
>   File "/usr/lib/python3.9/site-packages/libqtile/dgroups.py", line 169, in
> _add
>     if rule.matches(client):
>   File "/usr/lib/python3.9/site-packages/libqtile/config.py", line 675, in
> matches
>     return any(w.match(m) for m in self.matchlist)
>   File "/usr/lib/python3.9/site-packages/libqtile/config.py", line 675, in
> <genexpr>
>     return any(w.match(m) for m in self.matchlist)
>   File "/usr/lib/python3.9/site-packages/libqtile/window.py", line 1061, in
> match
>     return match.compare(self)
>   File "/usr/lib/python3.9/site-packages/libqtile/config.py", line 631, in
> compare
>     if not match(rule_value):
>   File "/usr/lib/python3.9/site-packages/libqtile/config.py", line 603, in
> predicate
>     return value and any(match(v) for v in value)
>   File "/usr/lib/python3.9/site-packages/libqtile/config.py", line 603, in
> <genexpr>
>     return value and any(match(v) for v in value)
>   File "/usr/lib/python3.9/site-packages/libqtile/config.py", line 602, in
> <lambda>
>     match = getattr(other, 'match', lambda v: other in v)
> TypeError: 'in <string>' requires string as left operand, not list

Looks like you're running master? This all just changed recently,

https://github.com/qtile/qtile/blob/master/CHANGELOG#L9

Tycho

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/20201216231224.GA569712%40cisco.

Reply via email to