
Alright, this should be fun...larspaul wrote:Have you ever thought about that the sun doesnt sets and rise at the same time the entire year?
You should include that in you script, i don't know any python so i can't.
Code: Select all
emerge -u atd
rc-update add atd default
/etc/init.d/atd start
cd /usr/local/src
wget http://freshmeat.net/redir/sunwait/47299/url_tgz/sunwait-20041208.tar.gz
tar xvzf sunwait-20041208.tar.gz
cd sunwait-20041208
make
mv sunwait /usr/local/binCode: Select all
#!/bin/bash
LOCATION="43.069886N 89.407534W"
SUN="/usr/local/bin/sunwait -p $LOCATION"
case $1 in
"rise")
$SUN | awk '/rises/ {print $3}'
;;
"set")
$SUN | awk '/rises/ {print $6}'
;;
"noon")
$SUN | awk '/meridian/ {print $4}'
esacCode: Select all
#!/bin/bash
SUN=/usr/local/bin/sun
COMMAND='pgrep -x X >&/dev/null && /usr/local/bin/onewithnature'
echo "$COMMAND morning >&/dev/null" | at `$SUN rise` + 10 minutes; sleep 1
echo "$COMMAND mid-day >&/dev/null" | at `$SUN noon` - 1 hour; sleep 1
echo "$COMMAND afternoon >&/dev/null" | at `$SUN noon` + 1 hour; sleep 1
echo "$COMMAND sunset >&/dev/null" | at `$SUN set` - 20 minutes; sleep 1
echo "$COMMAND evening >&/dev/null" | at `$SUN set` + 40 minutesCode: Select all
cd /usr/local/bin; chmod 755 sun makenature onewithnatureCode: Select all
su USERNAME /usr/local/bin/makenature >&/dev/nullCode: Select all
1 0 * * * /usr/local/bin/makenatureYay, someone cares... here is the new 0.3 release, code-named grenouillevery nice! thanks
Code: Select all
emerge -u atd pymetar
rc-update add atd default
/etc/init.d/atd start
cd /usr/local/src
wget http://freshmeat.net/redir/sunwait/47299/url_tgz/sunwait-20041208.tar.gz
tar xvzf sunwait-20041208.tar.gz
cd sunwait-20041208
make
mv sunwait /usr/local/binCode: Select all
cd /usr/bin; [ -x fbsetbg ] || wget http://www.khk.org/files/fbsetbg && chmod 755 fbsetbg
cd /usr/local/bin; wget http://www.khk.org/files/naturalbg && chmod 755 naturalbg
$EDITOR naturalbg # configure settings . . .