Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I'm using tmux for remote session. Using some great suggestions from a few blog posts, we can expose our local clipboard to remote servers so that we can easily yank text. Inspiration: - https://gist.github.com/gengmao/75e86c1d9d5427f9632d - https://gist.github.com/burke/5960455 - https://seancoates.com/blogs/remote-pbcopy/
- Loading branch information
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# MacOS Launch Agents | ||
|
||
Destination: `~/Library/LaunchAgents/` | ||
|
||
## Remote Clipboard Managers | ||
|
||
`pbcopy.plist` sets up a listener on localhost 2224. | ||
Combined with an SSH directive `RemoteForward 2224 127.0.0.1:2224`, | ||
this allows us to use `nc -q1 localhost 2224` on remote machines | ||
to write to the MacOS clipboard. | ||
|
||
See the tmux config setting `override_copy_command` for an example. | ||
|
||
Note that you will need to launch this service with `launchctl load ~/Library/LaunchAgents/pbcopy.plist` first. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Label</key> | ||
<string>localhost.pbcopy</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>/usr/bin/pbcopy</string> | ||
</array> | ||
<key>inetdCompatibility</key> | ||
<dict> | ||
<key>Wait</key> | ||
<false/> | ||
</dict> | ||
<key>Sockets</key> | ||
<dict> | ||
<key>Listeners</key> | ||
<dict> | ||
<key>SockServiceName</key> | ||
<string>2224</string> | ||
<key>SockNodeName</key> | ||
<string>127.0.0.1</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters