Skip to content

Commit dc2f12c

Browse files
committed
feat: add automatic type function
1 parent 38140e1 commit dc2f12c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

zsh/.functions

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,15 @@ function restart() {
418418
fi
419419
}
420420

421+
# type a key automatically
422+
function autotype() {
423+
local delay_amount="$1"
424+
local key="$2"
425+
426+
echo '⏳ Running autotype...'
427+
osascript -e "delay $delay_amount" -e "tell application \"System Events\"" -e "keystroke \"$key\"" -e "end tell"
428+
}
429+
421430
# clean install Pods
422431
function cleanpod() {
423432
echo '🍺 Cleanup Pod Cache...'

0 commit comments

Comments
 (0)