Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jagd auf roter Oktober #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions submarine/blink.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

for i in `seq 6`;
do
submarine.sh
sleep 0.5
done
36 changes: 36 additions & 0 deletions submarine/submarine.sh
Original file line number Diff line number Diff line change
@@ -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