aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/screenshot.sh
blob: 0fa365aaf477bad714ff372cf55f556c18bf14a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# Screenshot via ImageMagick
# Passes all args down to import command

SCREENSHOTS_DIR=$HOME/Pictures/Screenshots
FILENAME=$SCREENSHOTS_DIR/$(date +%F_%H-%M-%S).png

echo "$@"

mkdir -p $SCREENSHOTS_DIR
import $@ $FILENAME && xclip -selection clipboard -target image/png -i < $FILENAME