💾 Archived View for dots.omarpolo.com › bin › clip.gmi captured on 2023-09-28 at 15:43:37. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-06-03)
-=-=-=-=-=-=-
clip is a small utility to manage the X clipboard sensibly. It's meant to be used interactively, not in scripts.
if the standard input is not a tty, slurp everything (except the last newline!) to the clipboard
if [ ! -t 0 ]; then exec xclip -r -selection clipboard >/dev/null fi
otherwise output its contents
exec xclip -o -selection clipboard