WezTerm: Easily copy text or send notification to local machine (even when connected via SSH)

submited by
Style Pass
2025-01-21 13:30:08

I’ve used do_long_think; notify-send "thing finished" in the past to help. I can do other stuff then be interrupted when it finishes.

Any window in WezTerm which writes out the user var escape sequence triggers a function in the WezTerm lua config. For example ๐Ÿ‘‡ will send name: foo value: bar

Note: -w 0 on base64 command otherwise the base64 output is automatically wrapped by inserting newlines which breaks the escape sequence.

Here I wire up weznot and weznot. weznot triggers a notification with the value passed in and wezcopy copies the value to the clipboard.

To use these easily I create functions in dotfiles which output the escape sequences (these work over ssh as load into my SSH connections with sshrc).

Leave a Comment