about summary refs log tree commit diff stats
path: root/README.md
blob: dbf49535d2d0579f5dd6072c7b7c0c89da33bb8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# FOIL
## copy and paste shit

This is a POSIX-sh clone of
[clipboard.zsh](https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh)
that I made for my friend L.

No guarantees or promises are made.

## usage

```
$ foil.sh copy # copy from stdin to clipboard
$ foil.sh paste # paste from clipboard to stdout
```

there are cool aliases too:

```
$ foil.sh yeet # copy
$ foil.sh yoink # paste
```

**IN ADDITION**, you can just symlink `foil.sh` to `copy`, `paste`, `yoink`, or
`yeet`, and it'll Do The Right Thing:

```
$ yeet # same as foil.sh yeet
$ yoink # same as foil.sh yoink
```

`make install` from this repo will copy `foil.sh` to `yoink` and `yeet` in
`$(PREFIX)/bin` (default: `/usr/local/bin`).

## dependencies

`foil.sh` doesn't actually mangle your clipboard by itself.
instead it shells out (heh) to one of these:

- `tmux` (if you're in tmux)
- `termux-clipboard-set`/`termux-clipboard-get` (if you're in termux)
- `wl-copy`/`wl-paste` (if you're using wayland)
- `pbpaste`
- `xsel`
- `xclip`
- `lemonade`
- `doitclient`
- `win32yank`
- `clip.exe`/`powershell.exe` (if you're using Windows)

under cygwin-type systems, it'll write to or read from `/dev/clipboard`.

basically, I try to follow the ZSH plugin above as closely as possible.

## contributing

of course, new clipboard technology is coming out all the time (allegedly).  if
you have a new fancy clipboard editor and want me to add it, or if you've added
it yourself and have a patch, feel free to [email me](mailto:foil+git@acdw.net)
with a feature or merge request.