Basic python port of X2brightness