More fuzzy matching and matching multiple words for window switcher#57
More fuzzy matching and matching multiple words for window switcher#57hugovalk wants to merge 4 commits intoalbertlauncher:devfrom
Conversation
|
I got the message that you are not a fan of one-line functions :). Your feedback did trigger with me however, so that I want to propose it like this. Now the conditions that decide that a window can be an option are made explicit, namely the window must be not sticky and must match the query. Although there is still a one-line function, its name has a documenting function. If you don't like it, I can do your proposed solution, but I wanted to show this option to you. |
@ManuelSchneid3r could you please comment? |
|
I edited the the script and added some more nice features such as tokenized + fuzzy search and more. However I don't know how to add my code to this pull request. You can check out the code here: Thank you for the cool launcher! |
…ple words. This improves switching windows for java applications, which have a wm_class that starts with sun-awt-X11-XFramePeer.FreeMind. Also sometimes the first segment of the wm_class is something generic, like for example main.terminology. Often, the 'nice' application name can be found in the wm_name field.
|
I have still a question open on this PR. Any chance it could be answered? @ManuelSchneid3r |
686718e to
a1ab7f4
Compare
|
Unfortunately I let you all wait pretty long. Now I have the problem that I don't know which PR's are valid at all. Therefore I will close all PR's for tentatively. If you want me to reopen the PR let me know. Also it would be nice if you could resolve potential conflicts due to changes in the repo. Sorry for the inconveniences, but I am working on it for a week now. I'm in a hurry. Note that this is a copy paste message. 😉 |
The Window Switcher plugin is quite useful to me, but I had trouble matching some of the windows on my desktop. This happens because the wm_class is not always descriptive enough. For example:
sun-awt-X11-XFramePeer..main.terminologyfor the Terminology terminal app.In all those cases, the 'nice' application name can be found after the dot in wm_class or in the wm_name field.
This change matches all words in the query (splitted on whitespace) with wm_class OR wm_name. This enables me switch to all windows on my screen. Also, it allows switching to the right IntelliJ project, since the project name happens to be in the wm_name.
I have tested this change on Arch Linux with KDE and Ubuntu 18.04 with Gnome.