Skip to content

Instantly share code, notes, and snippets.

@hrj
Created July 4, 2014 03:26
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hrj/e9ed0d73d2daaa98b2d2 to your computer and use it in GitHub Desktop.
Save hrj/e9ed0d73d2daaa98b2d2 to your computer and use it in GitHub Desktop.
warm.sh | A red+green tint effect for the entire screen
#!/bin/bash
# Call with a percentage value from 0 to 100
# 0 means only red and green, 50 means half of blue is shown through
# if you don't give any arguments the calibration is cleared
if [[ -z "$1" ]]; then
echo Clearing all calibrations
xcalib -clear
else
FILTER=$1
echo Setting FILTER to $FILTER
xcalib -clear && xcalib -green 1 1 $((100 - ( 100 - $FILTER ) / 2 )) -blue 1 1 $FILTER -alter
fi
@jamesob
Copy link

jamesob commented Nov 16, 2015

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment