Skip to content

pyar6329/nclip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nclip

Clipboard share remote and local.

required: SSH remote port forwarding

replace nclip (https://github.com/pyar6329/nclip-legacy) by Rust

Installation

$ curl -sL -o nclip.tar.zst https://github.com/pyar6329/nclip/releases/latest/download/nclip-$(uname -s)-$(uname -m).tar.zst
$ tar -I pzstd -xvf nclip.tar.zst
$ sudo mv nclip /usr/local/bin/nclip
$ sudo chmod +x /usr/local/bin/nclip

Usage

$ nclip --help
Usage: nclip [OPTIONS]

Options:
  -c, --copy         copy from stdin
  -p, --port <PORT>  running port [default: 2230]
  -s, --server       running server
  -h, --help         Print help
  -V, --version      Print version

required: SSH remote port forwarding

run server

$ nclip -s

paste text from clipboard

$ nclip

copy text to clipboard

$ echo "hello" | nclip -c

or

$ nclip -c < README.md

NeoVim Configure

set clipboard+=unnamedplus
let g:clipboard = {
\   'name': 'nclip',
\   'copy': {
\      '+': 'nclip -c',
\      '*': 'nclip -c',
\    },
\   'paste': {
\      '+': 'nclip',
\      '*': 'nclip',
\   },
\   'cache_enabled': 1,
\ }