New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/purarue/server_clipboard

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/purarue/server_clipboard

  • v0.0.0-20241124082337-8a94ad2c1c8a
  • Source
  • Go
  • Socket score

Version published
Created
Source

server_clipboard

A server which saves my clipboard (in memory), so I can share it between my devices.

This has both a CLI interface and a web interface -- I use termux on my phone to communicate with my server (with server_clipboard <c|p> (copy/paste)); On other devices I don't have a terminal on, this has a web interface at /:

screencap of server html page

Install

Install golang (requires 1.18+)

You can clone and run go build, or:

go install -v "github.com/purarue/server_clipboard/cmd/server_clipboard@latest"

which downloads, builds and puts the binary on your $GOBIN.

Usage

Run server_clipboard server on a remote server somewhere, update your ~/.bashrc/~/.zshenv to include a password/remote address:

export CLIPBOARD_PASSWORD='i8nCzZnSY4hlHwUF9Ny15vqtPjfezpMHKZll0030Gn1p17Uiw7'
export CLIPBOARD_ADDRESS='http://mywebsite.com/clipboard'
NAME:
   server_clipboard - share clipboard between devices using a server

USAGE:
   server_clipboard [global options] command [command options] [arguments...]

COMMANDS:
   server, s  start server
   copy, c    copy to server clipboard
   paste, p   paste from server clipboard
   help, h    Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --port value, -p value  port to listen on (default: 5025) [$CLIPBOARD_PORT]
   --password value        password to use [$CLIPBOARD_PASSWORD]
   --server_address value  server address to connect to (default: "localhost:5025") [$CLIPBOARD_ADDRESS]
   --help, -h              show help (default: false)

This automatically detects which operating system you're on and uses the corresponding clipboard commands, see clipboard.go. If this can't, set the CLIPBOARD_COPY_COMMAND and CLIPBOARD_PASTE_COMMAND environment variables (those commands should read/write from/to STDIN/STDOUT)

clear-after

If you want to clear the clipboard after a certain amount of time, you can use the --clear-after flag. For example, to clear the clipboard after 10 minutes:

server_clipboard server --clear-after 600

FAQs

Package last updated on 24 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc