Conversation
169ab29 to
4abeb8d
Compare
If the callbacks registered in self.connect_mqtt() are called before the rest of the BustlightMonitor.__init__() method has completed, they'll try to access fields (like self.status) that don't exist yet, which causes a crash.
It's too hard to get the installation correct across different Python and glibc versions, and it's not a tool I use often enough to justify getting the installation working reliably.
f8b5090 to
bc77085
Compare
$2 is not used by either of the two functions.
26abb19 to
3058740
Compare
| echo "Paste is not supported via sshclip" >&2 | ||
| exit 1 |
There was a problem hiding this comment.
TODO: I'd like to see if I can make clip on the local system push the contents over the tunnel to a temporary file, and then if the temporary file is present, past_sshclip can dump it to stdout.
This lets me use clip in a system() call in vim, where both stdin and stdout would be connected to a pipe.
Locally this is equivalent, but when copying from a remote tmux session that I SSH'd into with sshclip, this will copy the remote selection to my local clipboard.
This removes the need for the +clipboard feature (which removes the need for the gvim shim) and when running Vim on a remote system through sshclip, it copies to my local system's clipboard.
| # setpriv --pdeathsig=TERM: kernel sends SIGTERM to socat when parent process dies | ||
| setpriv --pdeathsig=TERM -- \ | ||
| socat "UNIX-LISTEN:$LOCAL_SOCK,fork,mode=0600,unlink-early" \ | ||
| SYSTEM:'tmp=$(mktemp); cat > "$tmp"; clip < "$tmp" >/dev/null; rm -f "$tmp"' & |
There was a problem hiding this comment.
Check for socat before trying to setup the tunnel.
| bind-key -T copy-mode-vi y send-keys -X copy-pipe-no-clear "clip --copy" | ||
| # Do not exit copy mode after mouse selection; it's too handy to be able to select things for | ||
| # emphasis as I read through logs and such. | ||
| unbind -T copy-mode-vi MouseDragEnd1Pane |
There was a problem hiding this comment.
This works pretty well, except for scratchpads. There might also be something funky about scratchpads when ssh'd with sshclip and a disabled outer tmux session.
Probably need to build a scenario matrix 😅
There was a problem hiding this comment.
The mouse selection is pretty wonky in kas shells too. I wonder if it's environment dependent??
There was a problem hiding this comment.
Variables:
- local vs remote vs remote with local disabled
- scratchpad
- scratchpad from remote with local disabled
- scratchpad from remote with local enabled
- switching to copy mode with mouse vs existing copy mode
- kas shell
Closes #119
Closes #166