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

Suggestion: show modal on all displays not just one #74

Closed
PaulMorris opened this issue Nov 21, 2020 · 3 comments · Fixed by #118
Closed

Suggestion: show modal on all displays not just one #74

PaulMorris opened this issue Nov 21, 2020 · 3 comments · Fixed by #118

Comments

@PaulMorris
Copy link

Given an open laptop connected to an external display (or several?), I found that the modal appeared only on the laptop's screen and not the external display. I think it would be better if the modal appeared on all displays so you would always see it, no matter which screen you are looking at.

I have a small edit that does this, that's working for me locally, and I'd be glad to submit a pull request if there is interest.

(Also, many thanks for this wonderful project! I am really enjoying the ways it is improving my time spent staring at screens and pushing buttons.)

@agzam
Copy link
Owner

agzam commented Nov 30, 2020

Personally, I don't use more than two displays at the moment, but I'm sure a few people probably would like this. Also, it seems we currently show the HUD only on the main screen (that's the default behavior of hs.alert.show), maybe we should also have an option to make it appear on the active screen (where the mouse cursor is). So, perhaps an enum, with values like main, active, all.
Thank you for the idea and for the kind words.

@jaidetree
Copy link
Collaborator

If feel this would be best tackled via #72 or as a config option as I had experimented with this prior to the refactor and found it was obtrusive when watching fullscreen videos on another screen while looking up a word definition in Alfred for instance. If you feel this would make a better default, then the advising system would at least allow me to make it work like the current behavior without having to replace the whole call chain.

@Grazfather
Copy link
Collaborator

Grazfather commented Sep 12, 2021

Sample fix:

;; Make alerts show on all screens
(import-macros {: defadvice} :lib.advice.macros)
(defadvice alert-all
           [str style seconds]
           :override alert
           "Replace core.alert with one that alerts on all screens"
           (each [_ screen (pairs  (hs.screen.allScreens))]
             (hs.alert.show str
                            (or style 1)
                            screen
                            seconds)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants