xenocara/app/xlockmore/etc/xlocksat.pl

9 lines
203 B
Perl
Raw Normal View History

2006-11-26 04:07:42 -07:00
#!/usr/bin/perl -T -w
# xlocksat
require "ctime.pl";
#local($hour) = `/bin/date "+%H:"`;
local($hour) = (localtime)[2];
local($saturation) = (12 - abs($hour - 12)) / 12 ;
printf("%.2f\n", $saturation);