Replies: 5 comments 2 replies
-
Can you say more about what you mean? You want to use |
Beta Was this translation helpful? Give feedback.
-
Sorry, yes of course. After upgrading to big sur, the os notifucations have stopped being dismissable by using the keyboard, which is an annoyance to someone like my self that heavily rely on the keyboard. I have been searching for a solution to this problem for some time, and have not found one. It is more a question of scripting big sur in general than related to What I'd love is some script, e.g. |
Beta Was this translation helpful? Give feedback.
-
Would it work to just uncheck "Show in Notification Center" for the offending apps in the "Notifications & Focus" preference pane? (Names are slightly different in Big Sur; I'm on Monterey.) |
Beta Was this translation helpful? Give feedback.
-
To remove them completely, yes. But I’d rather be able to clear when Ive seen them and actually make use of them. Are they keyboard navigable in Monterey? They were before I upgraded to big sur.. |
Beta Was this translation helpful? Give feedback.
-
I think what you want should be possible via UI scripting. This should get you started: (def system-events (js/Application "System Events"))
(defn application-process
[s]
(-> system-events
(.-applicationProcesses)
(.byName s)))
(defn process
[s]
(-> system-events
(.-processes)
(.byName s)))
;; Open the control center by clicking on the time in the menu bar.
(-> (application-process "ControlCenter")
(.-menuBars)
(.at 0)
(.-menuBarItems)
(.byName "Clock")
(.click))
;; Find and click the close button.
(-> (process "Notification Center")
(.-windows)
(.byName "Notification Center")
;; FIXME
) In order to find and click the close button you'll probably want to use the accessibility inspector. |
Beta Was this translation helpful? Give feedback.
-
Now if we could make this clear the bloody Big Sur notifications (that they removed keyboard support for) this is a golden addition to my daily emacs setup! 😬
I've had a few attempts at this some time ago, but to no avail.
Nice work, tho! Feel free to close this at any time.
Beta Was this translation helpful? Give feedback.
All reactions