mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 17:44:52 +00:00
fix: dismiss notifications with hammerspoon in ventura
This commit is contained in:
parent
cdcc90f85d
commit
d1f21ec874
@ -0,0 +1,19 @@
|
||||
tell application "System Events"
|
||||
try
|
||||
set _groups to groups of UI element 1 of scroll area 1 of group 1 of window "Notification Center" of application process "NotificationCenter"
|
||||
|
||||
repeat with _group in _groups
|
||||
|
||||
set _actions to actions of _group
|
||||
|
||||
repeat with _action in _actions
|
||||
if description of _action is in {"Schlie§en", "Alle entfernen", "Close", "Clear All"} then
|
||||
perform _action
|
||||
|
||||
end if
|
||||
end repeat
|
||||
|
||||
end repeat
|
||||
|
||||
end try
|
||||
end tell
|
@ -10,7 +10,7 @@ obj.license = "MIT - https://opensource.org/licenses/MIT"
|
||||
|
||||
function obj:init()
|
||||
hs.hotkey.bind({ "cmd", "alt", "ctrl" }, "k", function()
|
||||
hs.osascript.javascriptFromFile("Spoons/DismissAlerts.spoon/close_notifications_applescript.js")
|
||||
hs.osascript.applescriptFromFile("Spoons/DismissAlerts.spoon/close_notifications.applescript")
|
||||
end)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user