skhd: Switch to an iTerm2 script
It now tries to tell an existing iT2 process to open a window instead
This commit is contained in:
parent
cef5669577
commit
3283aa4889
@ -1,5 +1,5 @@
|
||||
# Open Terminal
|
||||
cmd - return : /Applications/iTerm.app/Contents/MacOS/iTerm2
|
||||
cmd - return : ~/.config/yabai/open-iterm2.sh
|
||||
|
||||
# Navigation
|
||||
cmd - h : yabai -m window --focus west
|
||||
|
15
.config/yabai/open-iterm2.sh
Executable file
15
.config/yabai/open-iterm2.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#! /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
|
||||
|
Loading…
Reference in New Issue
Block a user