~scripts
40 itemsDownload ./*


..
dzen2
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
compton
dailywall
dmenu
importw
indexer
keep-on
mp3ogg
orage
pipes
pipes.x
rain
randwall
screen-dim
screencast
screencast2
scrot
scrotw
search
skull
slocker
starwars
streamit
sumnum
tty-colorize
usrmount
ytp
ytplay


scriptsscrotw
2 years agoDownloadRawClose


#!/bin/bash
#
# Source:      http://blog.bemoko.com/blog/2009/07/01/add-shadow-and-border-to-images-with-imagemagick/
# Profile:     http://www.ugra.ch/iso-color-profiles.phtml
#
# Author:      Twily                                       2014
# Description: Capture a window and add a drop shadow behind it
# Requires:    scrot, imagemagick, ISOcoated_v2_300_eci.icc
# Usage:       $ sh ./scrotw filename.png
#

if [ -z $1 ]; then set -- "scrotw.png"; fi

echo -e "\nscrotw: Please select the window you would like to\n"\
        "       capture by clicking the mouse in that window.\n"

scrot ~/scrotw.tmp.png -sbd 1 || exit 1
convert ~/scrotw.tmp.png -profile ~/.icc/ISOcoated_v2_300_eci.icc \
    \( +clone -background "rgba(6,6,6,1)" -shadow 75x7+0+0 \) \
    +swap -background "rgba(0,0,0,0)" -layers merge +repage ~/$1 &>/dev/null || exit 1

rm ~/scrotw.tmp.png

echo -e "Window captured and saved to \"\e[1;32m~/$1\e[0m\"."
exit 0

Top
twily at openmailbox dot org
©twily.info 2013 - 2017



744 046 visits
... ^ v