Code Monkey home page Code Monkey logo

clipsy's Introduction

๐Ÿ“‹ clipsy

Sync your clipboard across hosts.

Usage

Start the server on your laptop:

clipsy serve

Then setup your SSH to forward port 52697 by adding this to your ~/.ssh/config:

Host *
  RemoteForward 52697 127.0.0.1:52697

Then, from the remote host you can write to your clipboard with:

clipsy write foobar

Alternatively, you can also stream to your clipboard:

cat somefile.txt | clipsy write

Installation

Building from Source

You can install with Rust's cargo:

cargo install --git https://github.com/luizribeiro/clipsy
NixOS

On your flake.nix, add clipsy as an input

{
  inputs.sops-nix.url = "github:luizribeiro/clipsy;

  outputs = { self, nixpkgs, clipsy }: {
    # change `yourhostname` to your actual hostname
    nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
      # customize to your system
      system = "x86_64-linux";
      modules = [
        ./configuration.nix
        clipsy.nixosModules.linux
      ];
    };
  };
}

With the module loaded, you can enable clipsy as a service:

{ ... }:

{
  services.clipsy.enable = true;
}

If you setup the overlay clipsy.overlays.default, you will be able to install clipsy to your PATH as well (which is necessary for the neovim and tmux integrations):

{ pkgs, clipsy, ... }:

{
  nixpkgs.overlays = [
    clipsy.overlays.default
  ];
  environment.systemPackages = with pkgs; [ clipsy ];
}
nix-darwin

The instructions are the same as NixOS', with the difference that the module is clipsy.nixosModules.darwin instead of clipsy.nixosModules.linux.

Integrations

neovim

With vim-plug, simply add to your config:

Plug 'luizribeiro/clipsy'

And anything copied through the registers + and * will be automatically synced to your clipsy server.

tmux

With tpm (Tmux Plugin Manager), simply add to your config:

set -g @plugin 'luizribeiro/clipsy'

And anything copied through tmux will be automatically synced to your clipsy server.

Developing

We use devenv and direnv to build, so simply run:

direnv allow
cargo build

TODOs

  • Fix crash when clipboard contains image

clipsy's People

Contributors

luizribeiro avatar renovate[bot] avatar

Watchers

 avatar  avatar

clipsy's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • tokio 1
  • clipboard 0.5
  • clap 4
  • serde 1.0
  • serde_json 1.0.114
  • tokio-serde-json 0.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.