README.md (1018B)
1clipnotify is a simple program that, using the 2[XFIXES](https://cgit.freedesktop.org/xorg/proto/fixesproto/plain/fixesproto.txt) 3extension to X11, waits until a new selection is available and then exits. 4 5It was primarily designed for [clipmenu](https://github.com/cdown/clipmenu), to 6avoid polling for new selections. 7 8Here's how it's intended to be used: 9 10 while read; do 11 [an event happened, do something with the selection] 12 done < <(clipnotify -l) 13 14Or: 15 16 while clipnotify; do 17 [an event happened, do something with the selection] 18 done 19 20clipnotify doesn't try to print anything about the contents of the selection, 21it just exits when it changes. This is intentional -- X11's selection API is 22verging on the insane, and there are plenty of others who have already lost 23their sanity to bring us xclip/xsel/etc. Use one of those tools to complement 24clipnotify. 25 26You can choose a particular selection with `-s`, and loop instead of exiting 27with `-l`. See `clipmenu -h` for more information.