Skip to content

Instantly share code, notes, and snippets.

@threeiem
Created November 25, 2021 00:02
Show Gist options
  • Save threeiem/a09394e235d03f4c20444f02c5221479 to your computer and use it in GitHub Desktop.
Save threeiem/a09394e235d03f4c20444f02c5221479 to your computer and use it in GitHub Desktop.
Clipboard to image/png (X powered)
#!/usr/bin/env bash
set -euo pipefail
TARGET=${1:-"${HOME}/clipage.$(date -I).${RANDOM}.png"}
xclip -selection clipboard -t image/png -o > ${TARGET}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment