Skip to content

Improvements from setting up a build server#162

Open
Notgnoshi wants to merge 20 commits intomasterfrom
dev
Open

Improvements from setting up a build server#162
Notgnoshi wants to merge 20 commits intomasterfrom
dev

Conversation

@Notgnoshi
Copy link
Owner

@Notgnoshi Notgnoshi commented Jan 20, 2026

Closes #119
Closes #166

@Notgnoshi Notgnoshi force-pushed the dev branch 3 times, most recently from 169ab29 to 4abeb8d Compare January 21, 2026 00:50
@Notgnoshi Notgnoshi marked this pull request as ready for review January 23, 2026 17:08
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.
@Notgnoshi Notgnoshi force-pushed the dev branch 2 times, most recently from f8b5090 to bc77085 Compare February 13, 2026 21:53
@Notgnoshi Notgnoshi force-pushed the dev branch 2 times, most recently from 26abb19 to 3058740 Compare February 15, 2026 15:51
Comment on lines +104 to +105
echo "Paste is not supported via sshclip" >&2
exit 1
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"' &
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😅

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mouse selection is pretty wonky in kas shells too. I wonder if it's environment dependent??

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tmux - find solution for copying from a remote server to my local clipboard How to effectively use tmux with SSH

1 participant