This repository has been archived on 2025-01-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
.backup
.bin
.config
bspwm
conky
dunst
firestarter
htop
i3
mpd
mpv
polybar
qt5ct
rofi
skhd
sxhkd
syncthing-gtk
yabai
open-iterm2.sh
yabairc
dircolors
kglobalshortcutsrc
khotkeysrc
picom.conf
ptgdp.conf
redshift.conf
user-dirs.dirs
user-dirs.locale
.firestarter
.local
.ssh
.vim
.wpgen
.bashrc
.functions
.gitconfig
.gitmodules
.inputrc
.joy2keyrc
.profile
.vimrc
.xinitrc
home/.config/yabai/open-iterm2.sh
Salt 69d99c998b Yabai: Change iTerm script to reflect its behavior
With my config, it doesn't spawn a window on first launch
2020-04-08 01:23:10 -05:00

23 lines
538 B
Bash
Executable File

#! /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