Closed daneah closed 5 years ago
It would be cool for the GitHub stars component to open the configured repo in the browser on click via:
@iterm2.RPC def click_handler(session_id): repo = ... proc = await asyncio.create_subprocess_shell( f'open https://github.com/{repo}', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, ) stdout, stderr = await proc.communicate()
Unfortunately, the repo value is only available in the knobs, which can't be passed to the onclick coroutine. This is perhaps possible with some magic since the @StatusBarRPC coroutine does receive the knobs, but it was out of my reach.
repo
knobs
onclick
@StatusBarRPC
Resolved in #9 / #7
It would be cool for the GitHub stars component to open the configured repo in the browser on click via:
Unfortunately, the
repo
value is only available in theknobs
, which can't be passed to theonclick
coroutine. This is perhaps possible with some magic since the@StatusBarRPC
coroutine does receive the knobs, but it was out of my reach.