From c2a19e78212146bb3ebf9cc3169d3e2b80b12fc8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 19 Apr 2014 22:43:20 -0400 Subject: [PATCH] Add timelapse script --- bin/ss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/ss diff --git a/bin/ss b/bin/ss new file mode 100755 index 00000000..6c3713ac --- /dev/null +++ b/bin/ss @@ -0,0 +1,18 @@ +#!/bin/sh + +dir="$1" +if [ $# -eq 0 ]; then + [ ! -d ~/Desktop/ss ] && mkdir -p ~/Desktop/ss + dir=~/Desktop/ss +fi + +# Start taking screenshots every N seconds, until this script is called again +if [ ! -f ~/.ss ]; then + echo "Timelapse, on in 3..." + touch ~/.ss + sleep 3 + i=1;while [ -f ~/.ss ];do screencapture -t jpg -x ~/Desktop/ss/$i.jpg; let i++;sleep 5; done & +else + echo "Deactivating timelapse!" + rm ~/.ss +fi