From a0d7689b1e3c7fd74fab9df1ae74e2a6de62fe9b Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Sat, 10 Apr 2021 17:06:11 +1000 Subject: Add basic osx yabai+skhd conf --- .config/yabai/iterm2_open | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .config/yabai/iterm2_open (limited to '.config/yabai/iterm2_open') diff --git a/.config/yabai/iterm2_open b/.config/yabai/iterm2_open new file mode 100755 index 0000000..fd9efe4 --- /dev/null +++ b/.config/yabai/iterm2_open @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Detects if iTerm2 is running +if ! pgrep -f "iTerm" > /dev/null; then + open -a "/Applications/iTerm.app" +else + # Create a new window + if ! osascript -e 'tell application "iTerm2" to create window with default profile' > /dev/null; then + # Get pids for any app with "iTerm" and kill + for i in $(pgrep -f "iTerm"); do kill -15 "$i"; done + open -a "/Applications/iTerm.app" + fi +fi -- cgit