Last Updated: February 25, 2016
·
658
· danielmurphy

Make lolcommits choose your camera

When I'm sitting at my desk I want lolcommits to use the camera on my Cinema Display, but when I'm mobile it needs to use the camera on my Macbook Pro.

Put this in your project's .git/hooks/post-commit. It will list all your available video devices and tell lolcommits to use the last one listed.

Be sure to change the PATH line to work for you.

#!/bin/sh

### lolcommits hook (begin) ###
export PATH="~/.rbenv/versions/2.0.0-p353/bin/ruby:$PATH"
export LOLCOMMITS_DEVICE="$(imagesnap -l | tail -n1)"
lolcommits --capture --stealth --fork
###  lolcommits hook (end)  ###