Skip to content

Instantly share code, notes, and snippets.

@hellwolf
Last active September 7, 2023 20:25
Show Gist options
  • Save hellwolf/3c0d3da5113d71b6285afc1fc02bcb81 to your computer and use it in GitHub Desktop.
Save hellwolf/3c0d3da5113d71b6285afc1fc02bcb81 to your computer and use it in GitHub Desktop.
screenshot using `import` and `xclip`
# Ref: https://blog.roberthallam.org/2022/02/quick-tips-screenshot-screen-region-to-clipboard-under-x/
sh -c "import png:- | xclip -selection clipboard -t image/png"
sh -c "D=\"`xdg-user-dir PICTURES`/Screenshots\";import \"png:\$D/Screenshot from `date +'%Y-%m-%d %H-%M-%S'`.png\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment