itermocil icon indicating copy to clipboard operation
itermocil copied to clipboard

Fails if run within a hotkey window

Open kbrownlees opened this issue 5 years ago • 5 comments

It seems to fail if it is being run within a hotkey window (https://www.iterm2.com/documentation-hotkey.html - Dedicated Hotkey Windows).

It creates a new tab within the window then fails with

201:237: execution error: iTerm got an error: Can’t get tab 2. (-1728)

Any ideas?

iterm2: 3.2.3 tomanthony/brews/itermocil: stable 0.2.1

kbrownlees avatar Oct 11 '18 22:10 kbrownlees

I also encountered this issue, I think the iTerm AppleScript terms cannot reliably find the tab of a hotkey window (or perhaps the pane object does not include sufficient information). My pull request seems to fix the issue by making sure to construct a full reference to a given pane each time, instead of relying on references to pane objects.

sourtin avatar Nov 09 '18 14:11 sourtin

This is still an issue today I think, just ran into this issue. Has this been merged already @sourtin ?

avegancafe avatar Nov 11 '21 15:11 avegancafe

I just forked this and the homebrew brews repo so if you run into this, you can use my fork since this repo seems to be no longer maintained:

mkdir -p /opt/homebrew/Library/Taps/keyboard-clacker
git clone https://github.com/keyboard-clacker/homebrew-brews /opt/homebrew/Library/Taps/keyboard-clacker/homebrew-brews
brew update
brew install keyboard-clacker/brews/itermocil

avegancafe avatar Nov 11 '21 18:11 avegancafe

Hey! Sorry I haven't used itermocil in quite some time, hope your fork works well and that there haven't been any breaking changes in iTerm :)

sourtin avatar Nov 11 '21 18:11 sourtin

No worries! Nope it worked wonderfully @sourtin , thanks for doing the work to get it fixed! I definitely wouldn't know how to fix it so very grateful that the fix was already done 😄

avegancafe avatar Nov 11 '21 18:11 avegancafe