mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
Add serveclip
This commit is contained in:
parent
c7716a72cb
commit
87a56f05c3
2 changed files with 16 additions and 3 deletions
|
@ -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.
|
- 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
|
- 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
|
- *clip
|
||||||
- setclip - Sets the clipboard to the contents of the standard input
|
- setclip - Sets the clipboard to the contents of the standard input
|
||||||
- getclip - Sends the current clipboard contents out of the standard output
|
- 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!
|
- 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.
|
- 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.
|
- [shellshare](https://shellshare.net/) - A live terminal broadcasting utility.
|
||||||
- [colortrans](https://gist.github.com/MicahElliott/719710) - Convert rgb colours to xterm ones
|
- [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
|
- nautilus-here - A quick command that opens nautilus in the current directory. For lazy people :P
|
||||||
|
|
12
serveclip
Executable file
12
serveclip
Executable 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
|
||||||
|
|
Loading…
Reference in a new issue