Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
/ cwcr Public archive

A fish shell facade to interact with the clipboard

License

Notifications You must be signed in to change notification settings

giorgiga/cwcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cwcr

clipboard write, clipboard read, a fish shell facade to interact with the clipboard.

As of fish 3.6.0, the two built-in functions fish_clipboard_copy and fish_clipboard_paste effectively make using giorgiga/cwcr superfluous.

Please consider uninstalling cwcr and aliasing the new functions as cw and cr, for example by running:

fisher remove giorgiga/cwcr
alias -s cw fish_clipboard_copy
alias -s cr fish_clipboard_paste

Installation

Using Fisher

fisher install giorgiga/cwcr

Manually

curl -Lo ~/.config/fish/conf.d/cwcr.fish  --create-dirs \
     https://raw.githubusercontent.com/giorgiga/cwcr/main/conf.d/cwcr.fish
curl -Lo ~/.config/fish/functions/cw.fish --create-dirs \
     https://raw.githubusercontent.com/giorgiga/cwcr/main/functions/cw.fish
curl -Lo ~/.config/fish/functions/cr.fish --create-dirs \
     https://raw.githubusercontent.com/giorgiga/cwcr/main/functions/cr.fish

Dependencies

In order for cwcr to work, you'll need:

  • wl-clipboard, if you use Wayland
  • xcopy and/or xsel, if you use X11
  • optionally, perl (without it, you may run into issues when copying or pasting more than 100MiB of data)

Usage

This package adds two functions:

  • cw (clipboard write) reads from standard input and writes to the clipboard
  • cr (clipboard read) reads from the clipboard and writes to standard output

When writing to the cliboard, the last newline (if any) is ignored and so after executing (eg) echo hello world | cw the clipboard will contain hello world and not hello world\n.

If run in a non-graphical session, cwcr will read/write from a temporary file instead of the clipboard.

About

A fish shell facade to interact with the clipboard

Topics

Resources

License

Stars

Watchers

Forks

Languages