Skip to content

Instantly share code, notes, and snippets.

@kergoth
Created July 13, 2015 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kergoth/430b625820dac071abcf to your computer and use it in GitHub Desktop.
Save kergoth/430b625820dac071abcf to your computer and use it in GitHub Desktop.
#!/bin/sh
while true; do
list-iterm2-profiles | fzf | tr '\n' '\0' | xargs -0 open-iterm2-profile
done
#!/bin/sh
tmpfile="$(mktemp -t "${0##*/}.XXXXX")"
defaults export com.googlecode.iterm2 - >>"$tmpfile"
/usr/libexec/PlistBuddy -c 'Print "New Bookmarks"' "$tmpfile"|sed -n -e 's/ *Name = //p'
rm -f "$tmpfile"
#!/bin/sh
if [ $# -eq 0 ]; then
while read profile; do
set -- "$@" "$profile"
done
fi
for profile; do
osascript <<END
tell application "iTerm"
tell the current terminal
launch session "$profile"
end tell
end tell
END
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment