Skip to content

Commit

Permalink
Delay typing-out on macOS for 250ms, hopefully fixing 'avocado' on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Jan 6, 2024
1 parent 8874330 commit b1eb37a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions efck/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ def _type_macos(text):
tell application "System Events"
keystroke "v" using command down
key code 124 -- right arrow clears the selection
delay 0.15
delay 0.2
end tell
set the clipboard to prev_contents
'''
text = text.replace('"', '\\"')
proc = subprocess.run(['sh', '-c', f"sleep .2 && nohup osascript -e '{_OSASCRIPT.format(text)}' & disown"])
proc = subprocess.run(['sh', '-c', f"sleep .25 && nohup osascript -e '{_OSASCRIPT.format(text)}' & disown"])
return proc.returncode


Expand Down

0 comments on commit b1eb37a

Please sign in to comment.