daniellandau / switcher

Gnome Shell extension to switch windows quickly by typing
GNU General Public License v3.0
352 stars 43 forks source link

Auto Switching causes Switcher to hide instantly if only one window is open #77

Closed krmax44 closed 5 years ago

krmax44 commented 5 years ago

If I only have one window open, with Auto Switching enabled that means there's only one result which will instantly be selected, causing the Switcher window to hide instantly again with practically no time to start typing (to open a new app). I know there's Super + X but it'd be nice if this could be changed.

Thanks for the handy extension! :+1:

esauvisky commented 5 years ago

I can confirm. It sort of makes sense, I mean, I can definitely understand why this happens.

~On the other hand, if you have no window open at all, the switcher does stay open on the screen.~

At first glance, an easy fix would be bypassing the Auto Switching if and only if:

Yet again I have never looked into the code, so take it with a grain of salt :joy:

--- Edit --- It seems I had an old version. If no windows are open at all, it opens the Launcher even if you press the Switch combination, that's beautiful, great job. :clap:

krmax44 commented 5 years ago

I can confirm. It sort of makes sense, I mean, I can definitely understand why this happens.

On the other hand, if you have no window open at all, the switcher does stay open on the screen.

At first glance, an easy fix would be bypassing the Auto Switching if and only if:

* the text input is empty, and

* there are less or equal than one window open.

Yet again I have never looked into the code, so take it with a grain of salt joy

--- Edit --- It seems I had an old version. If no windows are open at all, it opens the Launcher even if you press the Switch combination, that's beautiful, great job. clap

Yup, was thinking of something similar. We're so close to perfection anyhow, might as well add that :smile:

daniellandau commented 5 years ago

Yeah, switching to the only window open automatically doesn't seem that sensible. I'll try to cook something up soon.

daniellandau commented 5 years ago

This is fixed by https://github.com/daniellandau/switcher/commit/9bc402e40e8cae67effcbbf746b502160f4f37e2 and I just submitted a new version to extensions.gnome.org. It should show up there eventually after review.

krmax44 commented 5 years ago

Awesome, thank you! :tada: