all repos — dotfiles @ f7712f82ec2a7cf22789e1eef4cafe9b34841d6a

my *nix dotfiles

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 black -shadow 60x60+0+0 \) \
12	+swap -background transparent -layers merge +repage "$scr_path/$output.png"
13	notify-send 'window screenshot taken!'
14fi
15
16xclip -selection clipboard -t image/png -i "$scr_path/$output.png"