Move Mac configs over
HA
This commit is contained in:
22
mac/.config/yabai/open-iterm2.sh
Executable file
22
mac/.config/yabai/open-iterm2.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# open-iterm2.sh
|
||||
# Copyright (C) 2020 Vintage Salt <rehashedsalt@cock.li>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
osascriptcmd='tell application "iTerm2" to create window with default profile'
|
||||
if ! pgrep -f "iTerm" > /dev/null 2>&1; then
|
||||
echo "Opening iTerm"
|
||||
open -a "/Applications/iTerm.app"
|
||||
fi
|
||||
if osascript -e "$osascriptcmd" > /dev/null 2>&1; then
|
||||
echo "Opening new iTerm window"
|
||||
else
|
||||
echo "Killing iTerm and restarting"
|
||||
killall "iTerm"
|
||||
open -a "/Applications/iTerm.app"
|
||||
osascript -e "$osascriptcmd"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user