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
Using Fisher
fisher install giorgiga/cwcr
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
In order for cwcr to work, you'll need:
wl-clipboard
, if you use Waylandxcopy
and/orxsel
, if you use X11- optionally,
perl
(without it, you may run into issues when copying or pasting more than 100MiB of data)
This package adds two functions:
cw
(clipboard write) reads from standard input and writes to the clipboardcr
(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.