Skip to content

Commit e8c87a2

Browse files
authored
Add option to always open a new window (#44)
1 parent 8683f5e commit e8c87a2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

custom_iterm_script.applescript

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
-- Change this property to true to always use a new window
2+
property open_in_new_window : false
3+
14
on alfred_script(q)
25
tell application "iTerm"
36
if application "iTerm" is running then
4-
try
5-
tell the first window to create tab with default profile
6-
on error
7+
if open_in_new_window is true then
78
create window with default profile
8-
end try
9+
else
10+
try
11+
tell the first window to create tab with default profile
12+
on error
13+
create window with default profile
14+
end try
15+
end if
916
end if
1017

1118
delay 0.1 -- If we do not wait, the command may fail to send

0 commit comments

Comments
 (0)