--Thisisv0.7ofthecustomscriptforAlfredAppforiTerm3.1.1+--Pleaseseehttps://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/--createdbySinanEldemwww.sinaneldem.com.tronalfred_script(q)ifapplication"iTerm2"isrunningorapplication"iTerm"isrunningthenrunscript" on run {q} tell application \"iTerm\" activate try select first window set onlywindow to true on error create window with default profile select first window set onlywindow to true end try tell the first window if onlywindow is false then create tab with default profile end if tell current session to write text q end tell end tell end run "withparameters{q}elserunscript" on run {q} tell application \"iTerm\" 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 "withparameters{q}endifend alfred_script
When you open a file from the finder in iTerm2 (e.g., by double-clicking a shell script), it will either open in a window or a tab. By default, it opens in a tab. You can change this with:
pastes (both regular and slow) are done by splitting the text to paste into chunks. there is a delay between the transmission of each chunk. to change the speed that "paste" pastes at:
to adjust the amount of dimming of split panes. Set the value to a floating-point number between 0 (no dimming) and 1 (complete dimming). The default is 0.15:
WelcometotheiTerm2PythonREPL!ThisisaninteractivePythoninterpreterwhereyoucanexperimentwithscripts.UnlikestandardPythoninterpreters,youcanuse"await"notinsideanasyncfunction.Here's an example script to try:import iterm2connection=await iterm2.Connection.async_create()await iterm2.Window.async_create(connection)⌘-click here for iTerm2 Python API Docs>>>