1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00

Add serveclip

This commit is contained in:
Starbeamrainbowlabs 2017-05-09 18:54:59 +01:00
parent c7716a72cb
commit 87a56f05c3
2 changed files with 16 additions and 3 deletions

View file

@ -50,6 +50,7 @@ Here's a list of the most interesting ones, along with what they do and where th
- getclip - Sends the current clipboard contents out of the standard output
- listenclip - Listens on localhost:5556 and pipes any data recieved into the clipboard. Make sure you're firewall is working correctly!
- sendclip - Pipes stdin to localhost:5556. Useful in conjuntion with ssh port forwarding and the tool above.
- serveclip - Serves the clipboard on port 5557. Doesn't close the connection automatically, sadly - pathes welcome!
- [shellshare](https://shellshare.net/) - A live terminal broadcasting utility.
- [colortrans](https://gist.github.com/MicahElliott/719710) - Convert rgb colours to xterm ones
- nautilus-here - A quick command that opens nautilus in the current directory. For lazy people :P

12
serveclip Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
### Settings ###
# The port number to listen on.
PortNumber=5557;
################
echo Clipboard serving on localhost:$PortNumber.
echo Press CTRL+C to quit.
while (true); do xclip -selection clipboard -o | nc -Nvl $PortNumber; echo Local clipboard sent to remote host.; done