blob: ef1e63df5da20d17705e64e1bf68bce29d67c566 (
plain) (
blame)
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
|
# clipbuzz
`clipbuzz` is a simple program that uses the [X Fixes Extension]
to wait until a new clipboard or primary selection is available and exit.
It was translated from [clipnotify] in C to Zig, and is intended for use
within a clipboard manager like [threa] to avoid polling for selections.
## Installation
`clipbuzz` depends on [Xlib] and an [implementation of Xfixes]
and uses [Zig] build tool:
```sh
zig build install --prefix $PREFIX
```
where `$PREFIX` is usually `$HOME/.local`, `/usr/local` or `/usr`
depending on your preference. The dependencies can usually be
found in your operating system's repository, and if you are lucky,
`clipbuzz` itself as well!
## Usage
```sh
while clipbuzz
do # something with xclip or xsel
done
```
## Copying
This is free and unencumbered software released into the public domain.
[X Fixes Extension]: https://gitlab.freedesktop.org/xorg/proto/fixesproto
[clipnotify]: https://github.com/cdown/clipnotify
[threa]: https://sr.ht/~cnx/threa
[Xlib]: https://gitlab.freedesktop.org/xorg/lib/libx11
[implementation of Xfixes]: https://github.com/Airblader/unclutter-xfixes
[Zig]: https://ziglang.org
|