DEV Community

Discussion on: What's your favourite command-line tool that makes you 💯 more productive?

Collapse
 
dglsparsons profile image
Douglas Parsons

I have a little bash script that takes a screenshot and copies it to the clipboard based on a (drawn rectangle) selection. It's probably my favourite.

#!/usr/bin/env bash

FILENAME="$(mktemp).png"
scrot -a $(slop -f '%x,%y,%w,%h') "$FILENAME"
xclip -selection clipboard -t image/png -i "$FILENAME"
rm -f "$FILENAME"
notify-send "Sshot taken"