bin/scr (view raw)
1#!/usr/bin/env bash
2
3scr_path=~/pics/scrots
4n=6; output=$(tr -cd '[:alnum:]' < /dev/urandom | head -c$n)
5
6if [ "$1" == "" ]; then
7 import -window root "$scr_path/$output.png"
8 notify-send 'screenshot taken!'
9elif [ "$1" == "-w" ]; then
10 import -window "$(xdotool getwindowfocus)" "$scr_path/$output.png"
11 convert "$scr_path/$output.png" \( +clone -background transparent -shadow 60x40+0+15 \) \
12 +swap -background white -layers merge +repage "$scr_path/$output.png"
13 notify-send 'window screenshot taken!'
14# elif [ "$1" == "-s" ]; then
15fi
16
17xclip -selection clipboard -t image/png -i "$scr_path/$output.png"