The part of Alfred’s workflow that involves shell uses the system terminal by default. By modifying the configuration, you can call item.
Iterm version: 3.0.11 Theoretically, 2.9 + is OK.
Alfred -> Feature -> Terminal -> Change the application to custom. A code box appears below, and paste the following script.
I’m used to this script. Every time, I will split a column on the right side of the current small window as a new window and execute the incoming command.
If you don’t like it, you can modify it yourself http://www.iterm2.com/documentation-scripting.html
on alfred_script(q)
if application "iTerm2" is running or application "iTerm" is running then
run script "
on run {q}
tell application \":Applications:iTerm.app\"
activate
try
select first window
set onlywindow to false
on error
create window with default profile
select first window
set onlywindow to true
end try
tell current session of the first window
if onlywindow is false then
tell split vertically with default profile
write text q
end tell
end if
end tell
end tell
end run
" with parameters {q}
else
run script "
on run {q}
tell application \":Applications:iTerm.app\"
activate
try
select first window
on error
create window with default profile
select first window
end try
tell the first window
tell current session to write text q
end tell
end tell
end run
" with parameters {q}
end if
end alfred_script
Read More:
- How to Fix Session is not Connecting (How to Diagnose it)
- How to set the custom blood bar UI in UE4 and how to call it
- How to cancel the commit, how to cancel the commit after git commit, and how to change the submitted content
- How to print how to output Int64_ t,uint64_ The value of T in C
- How to Fix IWAB0489E Error when deploying Web service to Axis runtime
- How to distinguish the source channel of router.push jump fast application
- How to use matlab to solve equation
- How to use JavaScript in HTML
- How to delete Microsoft AutoUpdate from Mac
- How to use Latex to Write Matrices
- How to solve problems like curl: (7) failed to connect to raw.githubusercontent.com Port 443: problem with connection used
- How to launch powershell script in C#
- How to Use Apt get Command Under Mac OSX
- How to save big data in Oracle to CLOB
- How to Fix Tomcat Error: Failed to destroy end point associated with ProtocolHandler[ajp-nio-8009]
- HTTP Error 502.5 – Process Failure (How to Fix)
- Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory (How to Fix)
- How to execute Makefile
- How to Fix Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- How to convert audio to subtitle (text) with Python?