lqth is a simple screenshot utility for X11. It writes thae image in a Farbfeld format to the stdout.
cargo build -r
cp target/release/lqth /usr/bin
- libX11
- To convert farbfeld data you can use ff2jpg or ff2png from: https://git.suckless.org/farbfeld/
Take a screenshot for the full screen
lqth > screen.ff
Take a screenshot of the active window
lqth -w $(xdotool getactivewindow) | ff2png > window.png
Take a screenshot of a specific region
lqth -r "$(xrectsel "x:%x,y:%y,w:%w,h:%h")" | ff2png > region.png
Take a screenshot of a specific region and copy it into the system clipboard
lqth -r $(xrectsel "x:%x,y:%y,w:%w,h:%h") | ff2png | xclip -sel clip -t image/png -i
Yep is just simple as that :)