Rust-Cb 0.1.0: cb — Command line interface to manage clipboard

cb

Build Status Download

Command line interface to manage clipboard

How to install

Pre-Compiled

you can download a pre-compiled executable, then you should copy that executable to /usr/bin or add it to your $PATH env. Do not forget to chmod +x cb.

Distribution packages

Users of Arch Linux can install package from AUR:

  • Precompiled release: cb-bin (Only x64 is supported)
  • Build latest release: cb
  • Build from master: cb-git

Build Manually

  • Install rust: curl -sSf https://sh.rustup.rs | sh
  • Install packages: xorg-dev and build-essential
  • Run make && sudo make install

How to use

  • Copy text: cb -t "Text to be copied"
  • Paste copied text: cb -p
  • Copy from stdin: cat file | cb

Usage

Usage: cb [OPTIONS]

Optional arguments:
  -h, --help       Prints the help message
  -V, --version    Prints the version
  -p, --paste      Pastes the content of clipboard
  -c, --clear      Clears the content of clipboard
  -s, --server     Starts server as a daemon
  -r, --raw        Do not print newline after pasting the content
  -t, --text TEXT  Store TEXT into clipboard

Comments

  • Can't find on crates.io
    Can't find on crates.io

    Oct 30, 2019

    Hi,

    I really like this package compared to some others I found. However, I can't seem to find it on crates.io and I wanted to make sure that I somehow didn't skip over it.

    Is this package on crates.io?

    Reply
  • Warning when building the package. [cb-git 0.1.0.r3.gb68417d-1]
    Warning when building the package. [cb-git 0.1.0.r3.gb68417d-1]

    Nov 10, 2020

    Warning when building the package.

       Compiling common v0.1.0 (/home/mthsmb/.cache/yay/cb-git/src/cb/common)
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
      --> common/src/errors/string_error_result.rs:11:28
       |
    11 |         self.map_err(|e| e.description().to_string())
       |                            ^^^^^^^^^^^
       |
       = note: `#[warn(deprecated)]` on by default
    
       Compiling server v0.1.0 (/home/mthsmb/.cache/yay/cb-git/src/cb/server)
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
     --> server/src/clipboard_handler.rs:9:48
      |
    9 |         ClipboardProvider::new().map_err(|e| e.description().to_string())?;
      |                                                ^^^^^^^^^^^
      |
      = note: `#[warn(deprecated)]` on by default
    
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
      --> server/src/clipboard_handler.rs:13:32
       |
    13 |                 .map_err(|e| e.description().to_string())?;
       |                                ^^^^^^^^^^^
    
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
      --> server/src/clipboard_handler.rs:18:32
       |
    18 |                 .map_err(|e| e.description().to_string())?,
       |                                ^^^^^^^^^^^
    
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
      --> server/src/clipboard_handler.rs:22:32
       |
    22 |                 .map_err(|e| e.description().to_string())?;
       |                                ^^^^^^^^^^^
    
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
      --> server/src/transmitter/async_unix/codec.rs:40:40
       |
    40 |                 Err(e) => return Err(e.description().to_string()),
       |                                        ^^^^^^^^^^^
    
    warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
      --> server/src/transmitter/async_unix/codec.rs:62:40
       |
    62 |                 Err(e) => return Err(e.description().to_string()),
       |                                        ^^^^^^^^^^^
    
       Compiling cli v0.1.0 (/home/mthsmb/.cache/yay/cb-git/src/cb/cli)
    warning: 1 warning emitted
    
    warning: 6 warnings emitted
    
    
    Reply
  • refactor code
    refactor code

    May 31, 2019

                                                                                                                                                                                                           
    Reply
  • refactor stdin readline
    refactor stdin readline

    May 8, 2019

                                                                                                                                                                                                           
    Reply
  • Update README.md
    Update README.md

    Jun 5, 2019

                                                                                                                                                                                                           
    Reply