GETSNARF(3)
β¨ GETSNARF(3) β¨
okay so bestie, this is GETSNARF(3) from the Library Functions Manual β the whole page is about the window system's snarf buffer, aka the cut-and-paste stash. it's giving clipboard lore, and honestly? iconic. π
π NAME π
getsnarf,putsnarfβ window system snarf (cut and paste) buffer access, fr fr. π«Ά
π¦ SYNOPSIS π¦
#include <draw.h>
char *getsnarf(void)
void putsnarf(char *text)
πΈ DESCRIPTION πΈ
getsnarf and putsnarf access the window system's snarf (cut and paste) buffer. yes, that's the vibe: one function reads the clipboard-ish thing, one function writes it. π
getsnarfreturns a copy of the current buffer. the returned pointer should be freed withfree(seemalloc(3)) when no longer needed. do not ghost that cleanup, bestie β free it when you're done. π§putsnarfsets the buffer to the text stringtext. simple, clean, main character energy. β¨
lowkey important: callers should assume that the snarf buffer is UTF. if the window system does not keep the buffer in UTF,getsnarfandputsnarfwill convert as necessary. no cap. π
π SOURCE π
/src/libdraw/snarf.c
π SEE ALSO π
snarfer(1)β go peek, iykyk. π₯
that's the whole page, and the footer vibe is: source /src/libdraw/snarf.c, manual/version GETSNARF(3), and the original footer doesn't print a date, so i'm not inventing one β periodt. ππ
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms