home/.config/yabai/open-iterm2.sh
Salt 3283aa4889 skhd: Switch to an iTerm2 script
It now tries to tell an existing iT2 process to open a window instead
2020-04-06 06:51:49 -05:00

16 lines
391 B
Bash
Executable File

#! /bin/sh
#
# open-iterm2.sh
# Copyright (C) 2020 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
if pgrep -f "iTerm" > /dev/null 2>&1; then
exec open -a "/Applications/iTerm.app"
elif ! osascript -e 'tell application "iTerm2" to create window with default profile' > /dev/null 2>&1; then
killall "iTerm"
exec open -a "/Applications/iTerm.app"
fi