-
Notifications
You must be signed in to change notification settings - Fork 456
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
Active screen #131
Comments
This feature was implemented a while ago, and it works fine for me on Linux. I know @KELiON also tested on his Mac. Maybe you discovered a bug. But first, what OS do you use? Do you have the latest version installed? |
I'm on macOS Sierra 10.12.3 running cerebro 0.2.6 that I installed with brew cask. |
I'm on macOS 10.12.4 running Cerebro 0.2.5 installed from the .dmg on the releases page and I can confirm that I only get the cerebro window on my main monitor. |
Guys I've just realized that I misread the description, sorry! The feature I mentioned was about remembering the window position, instead of being always displayed on the primary screen. That is, if you move a window to a different screen, next time it will start there. But unfortunately there is no electron API to detect the active screen, or I didn't find one. |
In that case I can confirm that it remembers the active screen on macOS 10.12.4 ;) |
Hi, https://github.com/electron/electron/blob/master/docs/api/screen.md Luis |
I think that's a good idea on how to follow a mouse, though I personally would rather prefer to follow a screen that has focused window... if there was such API. |
Alfred has both options and I was using "follow active screen" and then switched to "screen containing mouse" and I actually prefer that. |
I think long-term we should target having both options as well, and for now since we know how to implement "follow the mouse" it should be added right away 👍 |
Awesome, thanks. |
@luisdavim I couldn't find these options in Alfred. Is it somewhere in settings? |
@KELiON it's under the appearance tab on the theme options (button on the bottom left). |
@luisdavim now I see, thanks. I have only one concern: how can it work together with "save position" option? I.e. case:
I'd try to find some universal solution. I don't like too much configuration options and I think that the more configuration options users have, the less they use. |
with one of these options enabled, follow mouse or active window the position that is saved is relative to the monitor instead of absolute across all monitors. |
Hmm maybe do it similar to Alfred and have an exclusive option to either follow mouse or save position?! |
I would say, with follow mouse enabled, you save the position relative to the screen, if not, you save the absolute position. That way you only need a toggle to follow mouse or not and the default behaviour is kept. |
There's no need to have exclusive mode, now we detect a primary screen and save position based on its ID, if the "follow cursor" mode is enabled, we could just use exactly the same algorithm but base it on the "detected screen". That way, you could choose favorite positions on each of your screens, and they all will be remembered. |
To give you some context, this is the logic of storing the window position after it was moved. As you can see, the primary screen is detected, and its ID is used to save the position in the config. Supply it with "active" display instead, and the position will be stored for that screen. Here is how the window position is restored, again it is based on the primary screen, replace it with "active" one to load the proper position. |
That sounds like an awesome idea! |
I use a multi-head setup and cerebro always starts on the main screen (usually the laptop's built in monitor) it would be great if cerebro could be displayed on the active monitor, it could either follow the mouse or the window that has focus.
The text was updated successfully, but these errors were encountered: