- Add
switch_automatic.pyto~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunchwith:
#!/usr/bin/env python3
import asyncio
import iterm2
async def main(connection):
async with iterm2.VariableMonitor(connection, iterm2.VariableScopes.APP, "effectiveTheme", None) as mon: