-
Notifications
You must be signed in to change notification settings - Fork 0
/
augenkrebs
executable file
·25 lines (24 loc) · 1.55 KB
/
augenkrebs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env zsh
# A convenience wrapper around xstrobo
# Copyright (c) 2008 Lara Stoltenow <[email protected]>
# Licensed under WTFPL
mode="$1"
if [[ "$mode" == "" ]]; then
echo 'Usage: augenkrebs [1-4]'
exit 1
fi
case $mode in
1 ) ms=${1:-100}
echo "Mode: Black/White Flash ${ms}ms";
./xstrobo 0.1 0.1 0.1 ${ms}000 10 10 10 $[$ms/20.]000;;
2 ) echo "Mode: RGB 100ms";
./xstrobo 10 0.1 0.1 100000 0.1 10 0.1 100000 0.1 0.1 10 100000;;
3 ) echo "Mode: RGB 100ms with black and white 5ms flashes in between";
./xstrobo 10 0.1 0.1 100000 10 10 10 5000 0.1 10 0.1 100000 10 10 10 5000 0.1 0.1 10 100000 10 10 10 5000 10 0.1 0.1 100000 0.1 0.1 0.1 5000 0.1 10 0.1 100000 0.1 0.1 0.1 5000 0.1 0.1 10 100000 0.1 0.1 0.1 5000 10 0.1 0.1 100000 0.1 0.1 0.1 5000 0.1 10 0.1 100000 10 10 10 5000 0.1 0.1 10 100000 0.1 0.1 0.1 5000 10 0.1 0.1 100000 10 10 10 5000 0.1 10 0.1 100000 0.1 0.1 0.1 5000 0.1 0.1 10 100000 10 10 10 5000;;
4 ) ms=${1:-5}
echo "Mode: ${ms}ms Rainbow";
./xstrobo $(t=${ms}000; function gu() { for i in 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 3 4 5 6 7 8 9 10; do echo -n " $1 $i $2 "; done }; \
function gd() { for i in 10 9 8 7 6 5 4 3 2 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1; do echo -n " $1 $i $2 "; done }; \
gu 10 "0.1 $t"; gd "" "10 0.1 $t"; gu "0.1 10" $t ; gd 0.1 "10 $t"; gu "" "0.1 10 $t"; gd "10 0.1" $t);;
* ) echo "There is no mode $mode"
esac