This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
osascript -e ' | |
tell application "System Events" | |
if exists process "Claude" then | |
tell process "Claude" | |
if exists button "Allow for This Chat" of group 2 of group 1 of group 2 of group 1 of UI element "Claude" of group 1 of group 1 of group 1 of group 1 of window "Claude" then | |
click button "Allow for This Chat" of group 2 of group 1 of group 2 of group 1 of UI element "Claude" of group 1 of group 1 of group 1 of group 1 of window "Claude" | |
log "clicked allow button" | |
end if | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- cmd + alt + m uniminimses last minimised app | |
hs.hotkey.bind({ "cmd", "alt" }, "m", function() | |
local script = [[ | |
tell application "System Events" to tell process "Dock" | |
set dockUIElements to UI elements of list 1 | |
repeat with i from (count dockUIElements) to 1 by -1 | |
set anElement to item i of dockUIElements | |
if ((role description of anElement) as string) is equal to "minimised window dock item" then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" to tell process "Dock" | |
set dockUIElements to UI elements of list 1 | |
repeat with i from (count dockUIElements) to 1 by -1 | |
set anElement to item i of dockUIElements | |
if ((role description of anElement) as string) is equal to "minimised window dock item" then | |
click anElement | |
exit repeat |