Skip to content

Instantly share code, notes, and snippets.

View supersational's full-sized avatar
🎹

Sven supersational

🎹
  • University of Bristol
  • Bristol, UK
View GitHub Profile
@supersational
supersational / claude-autoclicker.sh
Last active February 2, 2025 02:07
Claude Autoclick "Allow Tool"
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
@supersational
supersational / unminimise.lua
Created December 13, 2023 13:13
Hammerspoon unminimise shortcut
-- 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
@supersational
supersational / unminimise.applescript
Created December 13, 2023 13:09
Unminimise last minimised app
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