All Projects → ms-jpq → Isomorphic Copy

ms-jpq / Isomorphic Copy

Cross platform clipboard | networkless! remote copy

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Isomorphic Copy

Extrakto
tmux - quickly select, copy/insert/complete text without a mouse
Stars: ✭ 320 (+272.09%)
Mutual labels:  tmux, clipboard
Tmux Yank
Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin.
Stars: ✭ 1,941 (+2156.98%)
Mutual labels:  tmux, clipboard
Dotfiles
My dotfiles, managed with GNU stow
Stars: ✭ 56 (-34.88%)
Mutual labels:  tmux
Dotfiles
🐧 Configuration files
Stars: ✭ 81 (-5.81%)
Mutual labels:  tmux
Ember Cli Clipboard
A simple ember wrapper around clipboard.js
Stars: ✭ 72 (-16.28%)
Mutual labels:  clipboard
Dotfiles
My Neovim + Tmux + Zsh dev setup
Stars: ✭ 60 (-30.23%)
Mutual labels:  tmux
Kubectl Cssh
A kubectl plugin to ssh into Kubernetes nodes within separate tmux panes
Stars: ✭ 76 (-11.63%)
Mutual labels:  tmux
Idempotent Desktop
🛸 NixOS, Xmonad, Neovim
Stars: ✭ 51 (-40.7%)
Mutual labels:  tmux
Zynix Fusion
zynix-Fusion is a framework that aims to centralize, standardizeand simplify the use of various security tools for pentest professionals.zynix-Fusion (old name: Linux evil toolkit) has few simple commands, one of which is theinit function that allows you to define a target, and thus use all the toolswithout typing anything else.
Stars: ✭ 84 (-2.33%)
Mutual labels:  tmux
Imgursniper
📷 A quick and easy Image, Screenshot and Screen recording sharing tool
Stars: ✭ 69 (-19.77%)
Mutual labels:  clipboard
Nopaste
📋 Client-side paste service
Stars: ✭ 79 (-8.14%)
Mutual labels:  clipboard
Dotfiles
Workstation configuration, provisioning and tools
Stars: ✭ 67 (-22.09%)
Mutual labels:  tmux
Diodon
Aiming to be the best integrated clipboard manager for the Gnome/Unity desktop
Stars: ✭ 60 (-30.23%)
Mutual labels:  clipboard
Tmux Config
Tmux configuration, that supercharges your tmux to build cozy and cool terminal environment
Stars: ✭ 1,210 (+1306.98%)
Mutual labels:  tmux
Rainbarf
it's like Rainmeter, but for CLI!
Stars: ✭ 1,087 (+1163.95%)
Mutual labels:  tmux
Whale
🐋 Show Ethereum and Bitcoin price in command line interface (CLI).
Stars: ✭ 81 (-5.81%)
Mutual labels:  tmux
Dotfiles
💻 macOS / Ubuntu dotfiles
Stars: ✭ 1,074 (+1148.84%)
Mutual labels:  tmux
Enhanced Github
🚀 Browser extension to display size of each file, download link and copy file contents directly to the clipboard
Stars: ✭ 1,146 (+1232.56%)
Mutual labels:  clipboard
Clipboard Rails
clipboard.js javascript library integration for your Rails 4 and Rails 5 applications
Stars: ✭ 72 (-16.28%)
Mutual labels:  clipboard
Dotfiles
My Neovim, ZSH, Tmux and dev tools setup, with installation scipts
Stars: ✭ 85 (-1.16%)
Mutual labels:  tmux

Isomorphic Copy

Cross platform clipboard.

Both remote and local

Works out of the 📦 with most programs that use pbcopy, xclip, wl-copy, etc.

Works the same locally as over SSH, inside Docker containers, et al.

It even works inside Docker over SSH and then inside Docker!, infinitely chainable.

clippy


Networkless

isomorphic-cp communicates by stdio and unix socket only!

All it does is spawn subprocesses and listen to IO.

This makes it amazingly versatile.

diagram


Daemonless

You literally just run cssh <ssh-args> or cdocker <container-name>.

No local daemon required. The remote "daemon" is just a subprocess of a subprocess. Zero cost when you are not using it.


How to use

Requires xclip or wl-clipboard under GUI linux.

Clone this repo to the same location on two machines. Either relative to ~ or /.

Prepend isomorphic-copy/bin to your PATH for example:

export PATH="$XDG_CONFIG_HOME/isomorphic-copy/bin:$PATH" in your bash/zshrc file.

You need to do this on both local and remote.

--

Automatically most applications that use xclip, wl-clipboard, pbcopy and so forth will use isomorphic-copy with zero setup.

Works just like python virtualenv!

--

I added two convenience functions:

You don't have to use these. Things like pbcopy and pbpaste will continue to work.

echo <my message> | c Use c to copy to system clipboard

p > my_message.txt Use p to paste from system clipboard

--

Connect to remote with one of

cssh <ssh-args>

cdocker <docker container name>

Once daemon is launched, remote copy will propagate to local system clipboard.

Remote applications that use xclip, pbcopy, wl-copy will propagate to local system clipboard.

--

Local -> SSH -> Docker

If you want to copy from a Docker container on a remote machine.

from local run cssh <ssh-args> to remote

from remote run cdocker <container name / sha> to container

And you are set!

Integrations

Tmux

Copy will automatically propagate to local / remote tmux clipboard.

If daemon is run under tmux, copy will also propagate to the local tmux clipboard.

If no system clipboard is available, copy / paste will use tmux clipboard.

Copying FROM tmux will require this snippet.

set -g mouse on

bind -T copy-mode MouseDragEnd1Pane \
  send-keys -X stop-selection

bind -T copy-mode MouseDown1Pane \
  select-pane \;\
  send-keys -X copy-pipe "c" \;\
  send-keys -X clear-selection

Drag to select, click in dragged area to copy.

Replace copy-mode with copy-mode-vi if you are using vi emulation.

Vim

Neovim will only use xclip if the x11 environmental variable DISPLAY is set.

Vim will require an autocmd event.

Add this snippet to your vimrc, to work for both vims.

if has('nvim')
  " use unnamedplus only! or else will double set
  set clipboard=unnamedplus
  if getenv('DISPLAY') == v:null
    exe setenv('DISPLAY', 'FAKE')
  endif
else
  autocmd TextYankPost * call system("c", getreg('"'))
endif

Others

Most CLI applications will work out of the box. (such as lazygit, for example).

If not, check if they require DISPLAY like Neovim.

Fallback

If no system / tmux clipboard is found, setting environmental variable ISOCP_USE_FILE=1 will enable using a temp file as a crude clipboard.

It will write inside the git repo, put it somewhere safe.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].