I hereby claim:
- I am gnachman on github.
- I am iterm2 (https://keybase.io/iterm2) on keybase.
- I have a public key whose fingerprint is 8B55 5615 6DB7 B5A4 4C93 3018 3225 C306 16D4 4CCA
To claim this, I am signing this object:
| (unless (display-graphic-p) | |
| (add-hook 'after-make-frame-functions | |
| '(lambda | |
| ;; Take advantage of iterm2's CSI u support (https://gitlab.com/gnachman/iterm2/-/issues/8382). | |
| (xterm--init-modify-other-keys) | |
| ;; Courtesy https://emacs.stackexchange.com/a/13957, modified per | |
| ;; https://gitlab.com/gnachman/iterm2/-/issues/8382#note_365264207 | |
| (defun character-apply-modifiers (c &rest modifiers) | |
| "Apply modifiers to the character C. |
| Mac:/Users/gnachman/git/iterm2% make paranoidNMSSH -j16 | |
| /usr/bin/sandbox-exec -f deps.sb /Applications/Xcode.app/Contents/Developer/usr/bin/make NMSSH | |
| echo begin configure-armopenssl | |
| begin configure-armopenssl | |
| mkdir -p submodules/openssl/build-arm | |
| cd submodules/openssl/build-arm && ../Configure darwin64-arm64-cc no-asm -Wl,-ld_classic && /Applications/Xcode.app/Contents/Developer/usr/bin/make clean && /Applications/Xcode.app/Contents/Developer/usr/bin/make build_generated | |
| Configuring OpenSSL version 3.4.0 for target darwin64-arm64-cc | |
| Using os-specific seed configuration | |
| Created configdata.pm | |
| Running configdata.pm |
| #!/bin/bash | |
| CD_CMD="cd "\\\"$(pwd)\\\"" && clear" | |
| if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then | |
| CD_CMD="cd "\\\"$(pwd)\\\""; and clear" | |
| fi | |
| VERSION=$(sw_vers -productVersion) | |
| OPEN_IN_TAB=0 | |
| while [ "$1" != "" ]; do |
| set itermRunning to (application "iTerm" is running) | |
| set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh") | |
| set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'" | |
| tell application "iTerm" | |
| activate | |
| if not (exists window 1) or (itermRunning = false) then | |
| reopen | |
| end if |
| User runs `ssh-wrapper example.com` | |
| `ssh-wrapper` does: | |
| `ssh example.com /usr/bin/env sh -c "$(cat conductor.sh)" | |
| Where `conductor.sh` is a sh script that does something like (pseudoterminal below): | |
| echo <control sequence to notify terminal emulator that it's in ssh mode> | |
| run login shell as a child process through `script` on file descriptor 3 | |
| while true: | |
| output = [read from file descriptor 3 without blocking] |
| on write_to_file(this_data, target_file, append_data) | |
| try | |
| set the target_file to the target_file as string | |
| set the open_target_file to open for access file target_file with write permission | |
| if append_data is false then set eof of the open_target_file to 0 | |
| write this_data to the open_target_file starting at eof | |
| close access the open_target_file | |
| return true | |
| on error | |
| try |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python3.7 | |
| import iterm2 | |
| async def main(connection): | |
| app = await iterm2.async_get_app(connection) | |
| session = app.current_terminal_window.current_tab.current_session | |
| async with session.get_screen_streamer(want_contents=True) as streamer: | |
| while True: |
| #!/usr/bin/env python3.7 | |
| import iterm2 | |
| async def main(connection): | |
| app = await iterm2.async_get_app(connection) | |
| session = app.current_terminal_window.current_tab.current_session | |
| contents = await session.async_get_screen_contents() | |
| for i in range(contents.number_of_lines): |
| _NXShowKeyAndMain | |
| 0x7fff35b16cf3 <+0>: pushq %rbp | |
| 0x7fff35b16cf4 <+1>: movq %rsp, %rbp | |
| 0x7fff35b16cf7 <+4>: pushq %r15 | |
| 0x7fff35b16cf9 <+6>: pushq %r14 | |
| 0x7fff35b16cfb <+8>: pushq %r13 | |
| 0x7fff35b16cfd <+10>: pushq %r12 | |
| 0x7fff35b16cff <+12>: pushq %rbx | |
| 0x7fff35b16d00 <+13>: pushq %rax | |
| 0x7fff35b16d01 <+14>: leaq 0x5a1c6c90(%rip), %r15 ; NSApp |