Skip to content

Instantly share code, notes, and snippets.

@tbnorth
Created July 7, 2015 18:13
Show Gist options
  • Save tbnorth/4b781ba2b8f59c83dd5e to your computer and use it in GitHub Desktop.
Save tbnorth/4b781ba2b8f59c83dd5e to your computer and use it in GitHub Desktop.
show selection / clipboard content
while true; do
echo
for thing in primary secondary clip-board; do
echo $thing
text=$(xclip -out -selection $thing 2>/dev/null || echo N/A)
echo " " ${text:0:40}
done
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment