Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[window_switcher] Fix WM_CLASS with an unexpected number of parts #116

Closed
wants to merge 1 commit into from

Conversation

saierd
Copy link

@saierd saierd commented Apr 5, 2021

Closes albertlauncher/albert#967.

Usually the WM_CLASS printed by wmctrl has two parts (instance and class
name), separated by a dot. There are cases where this is not true:

Both cases previously lead to a ValueError due to the unexpected number
of parts after the split.

We now handle the second case by splitting the list of dot-separated
parts in the middle, assuming both pieces have the same number of parts.
As a fallback, we use the whole WM_CLASS as the instance name, which
should also cover the case of the Chrome window.

Closes albertlauncher/albert#967.

Usually the WM_CLASS printed by wmctrl has two parts (instance and class
name), separated by a dot. There are cases where this is not true:

* Chrome's picture-in-picture window shows a WM_CLASS of N/A (see
  albertlauncher/albert#967).
* Nautilus / Gnome Files on Ubuntu 20.04 shows a WM_CLASS value of
  'org.gnome.Nautilus.Org.gnome.Nautilus', indicating the instance name
  'org.gnome.Nautilus' with the class 'Org.gnome.Nautilus'.

Both cases previously lead to a ValueError due to the unexpected number
of parts after the split.

We now handle the second case by splitting the list of dot-separated
parts in the middle, assuming both pieces have the same number of parts.
As a fallback, we use the whole WM_CLASS as the instance name, which
should also cover the case of the Chrome window.
@ManuelSchneid3r
Copy link
Member

0.18 is out. Please check the new api . Do you mind to volunteer as a maintainer for the plugin?

@ManuelSchneid3r
Copy link
Member

@saierd are you still interested in getting this plugin upstream?

@ManuelSchneid3r
Copy link
Member

I am going to close this PR. It is not that I dont want this to be shipped upstream, but, as is, it cant be merged due to conflicts. Users/devs get the impression that I dont want to merge plugins, probably simply due to the amount of open PRs. Also it's cumbersome for me to repeatedly iterate all these abandoned and stale PRs. Note that I am still interested in merging an up to date version of this plugin and I still get notifications. So if you want something to happen leave a comment or simply open a new PR.

@albertlauncher albertlauncher locked and limited conversation to collaborators Aug 29, 2023
@ManuelSchneid3r
Copy link
Member

Please continue any discussion here: https://github.com/orgs/albertlauncher/discussions/1299

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants