~scripts
55 itemsDownload ./*

55 itemsDownload ./*

..
dzen2
tiling
vosh
4cdl
4trips
alarm
ambient
ana-wall.sh
battery-monitor
brightness.sh
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
keep-on
mp3ogg
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
rotate.sh
scan.sh
screen-dim
screencast
screencast2
scrot
scrotw
search
skull
slocker
starwars
streamit
sumnum
tty-colorize
usrmount
ytp
ytplay


scriptsscrotw
2 656•  8 years ago•  DownloadRawClose
8 years ago•  2 656

{}
#!/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.info 2013 - 2024
twily at twily dot info



2 018 730 visits
... ^ v