diff --git a/submarine/blink.sh b/submarine/blink.sh new file mode 100755 index 0000000..6ba6870 --- /dev/null +++ b/submarine/blink.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for i in `seq 6`; +do + submarine.sh + sleep 0.5 +done diff --git a/submarine/submarine.sh b/submarine/submarine.sh new file mode 100755 index 0000000..a8affb7 --- /dev/null +++ b/submarine/submarine.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +if [[ $(pgrep -c redshift) = 0 ]]; then + echo "redshift not running" + START=1 +else + echo "redshift already running" + START=0 +fi + +xrandr --verbose -q | grep Gamma | grep -q "1.0:1.0:1.0"; +#if [[ "$*" = "on" ]]; then +if [ $? == 0 ]; then + echo Making screen red + if [[ $START = 0 ]]; then + notify-send "stopping redshift" + pkill -STOP redshift + sleep .2 + fi + redshift -rPO1500 +#elif [[ "$*" = "off" ]]; then +else + redshift -x + if [[ $START = 0 ]]; then + echo "cont red" + notify-send "continuing redshift" + pkill -CONT redshift + else + echo "start red" + notify-send "starting redshift" + redshift & + fi +#else +# echo "requires one of: 'on', 'off'" +# exit 1 +fi