#!/bin/bash
################################################################################
#                                                                              #
#  RUN_BASH is started by animation_space.lua and runs every conky update      #
#  interval of 01-scifi-background.conky. Here you can start a bash script     #
#  that needs to be run between a start and stop frame. Frame counter is       #
#  shown on the bottom of the left monitor in the cockpit.                     #
#                                                                              #
#  startframe = frame number the script starts doing things                    #
#  stopframe  = frame number the script stops doing things                     #
#  Don't forget the '&' at the end!                                            #
#                                                                              #
#  For examples of a script, see existing ones. Like warpspeed-bar             #
#                                                                              #
################################################################################
if [ "$1" = "" ]; then
  echo -e "\n\e[31m  Can only be started from within conky!\e[m\n"
  exit
fi

# For debug on terminal uncomment lines below
#space_frame=$(cat ./images/space/current/conky_slideshow_index)
#echo -e "\e[32mRUN_BASH at frame:\e[m $(cat ./images/space/current/conky_slideshow_index)"

################################################################################
####   Put your scripts below   ################################################
################################################################################
#
#
#  Place scripts here with start and stop frame
#
# Path to script            startframe   stopframe  &
./scripts/star-sensor-left 0 149 random &
./scripts/star-sensor-left 150 158 &
./scripts/star-sensor-left 159 224 random &
./scripts/star-sensor-left 225 234 &
./scripts/star-sensor-left 235 247 random &
./scripts/star-sensor-left 248 255 &
./scripts/star-sensor-left 256 481 random &
./scripts/star-sensor-left 482 492 &
./scripts/star-sensor-left 493 600 random &
./scripts/star-sensor-left 601 612 &
./scripts/star-sensor-left 613 731 random &
./scripts/star-sensor-left 732 744 &
./scripts/star-sensor-left 745 4445 random &

./scripts/star-sensor-right 0 209 random &
./scripts/star-sensor-right 210 217 &
./scripts/star-sensor-right 218 249 random &
./scripts/star-sensor-right 250 259 &
./scripts/star-sensor-right 260 309 random &
./scripts/star-sensor-right 310 318 &
./scripts/star-sensor-right 319 430 random &
./scripts/star-sensor-right 431 440 &
./scripts/star-sensor-right 441 670 random &
./scripts/star-sensor-right 671 680 &
./scripts/star-sensor-right 681 699 random &
./scripts/star-sensor-right 700 718 &
./scripts/star-sensor-right 719 729 random &
./scripts/star-sensor-right 730 745 &
./scripts/star-sensor-right 746 4445 random &

./scripts/warpspeed-bar 130 910 - &
./scripts/warpspeed-bar 911 2500 + &

./scripts/random-fans go &

#################################################################################
exit 0
