Skip to content

Instantly share code, notes, and snippets.

@viatcheslavmogilevsky
Last active May 5, 2025 14:53
Show Gist options
  • Save viatcheslavmogilevsky/a294e42589f02d41f60bc52ed70d0e54 to your computer and use it in GitHub Desktop.
Save viatcheslavmogilevsky/a294e42589f02d41f60bc52ed70d0e54 to your computer and use it in GitHub Desktop.
macOS automation: bootstrap day
-- Launch iTerm
tell application "iTerm"
activate
end tell
-- comment example:
-- A man could lose himself in London, lose himself in London!
-- Legend:
-- meta-dir is special dir where notes (long-file.md/short-file.txt) are located
do shell script "/usr/local/bin/subl ~/meta-dir"
do shell script "/usr/local/bin/subl ~/meta-dir/long-file.md:9999"
do shell script "/usr/local/bin/subl ~/meta-dir/short-file.txt"
-- smerge example:
-- do shell script "/usr/local/bin/smerge ~/meta-dir"
-- obsidian example:
-- do shell script "/usr/bin/open \"obsidian://open?vault=example-vault\""
-- Launch Ghostty example:
-- tell application "Ghostty"
-- activate
-- end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment