1
0
Fork 0

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

@ -46,10 +46,11 @@ Here's a list of the most interesting ones, along with what they do and where th
- brightness.sh - Another small script I've written that controls the brightness of my screen. It works for me, but it may not work for you.
- ptr - A small script I wrote that uses `dig` to do PTR (reverse DNS) lookups, since I have to keep looking the command up every time :P
- *clip
- setclip - Sets the clipboard to the contents of the standard input
- 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!
- setclip - Sets the clipboard to the contents of the standard input
- 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