Future full-stack developer

Screenshot part of your display using scrot

So I have been using scrot to take screenshots for ages. The only downside has been the inability to grab just a portion of the screen. There are newer applications that do this out of the box. Applications like Flameshot. The downside of that application is that it pulls the entire Qt5-base and several other Qt applications down with it. I do not use any Qt applications, so having to pull down all of those just to take a partial screenshot is insane to me.

So I have been taking full screen screenshots and cropping them in Gimp for ages now. Recently though I came across a Reddit post with an amazingly simple solution to my problem. It uses xclip's selection flag with scrot to get this functionality, which I find brilliant. To use this, add the following to your i3 config, replacing [Save location] with the actual location you want to save the screenshot to.

bindsym --release Shift+Print exec "scrot ~/[Save Location]/$(date +%F-%H%M%S).png -s -e 'xclip -selection c -t image/png < $f' 1"

Now when you press shift+printscreen in i3, you'll get a plus arrow which allows you to select a portion of your screen and screensot it!