aboutsummaryrefslogtreecommitdiff
path: root/experiments/draw/sequence
blob: 6000fed0b2cc521ffa9afc0f8b24c50b30770ee6 (plain)
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
26
27
28
29
30
31
#!/bin/sh
cd "$(dirname "$0")"
. ./lib.sh

pattern='
10101010
1100110011001100
11110000111100001111000011110000
1111111100000000111111110000000011111111000000001111111100000000
'
pattern="$(echo "$pattern" | tr -d '\n')"
length="$(echo "$pattern" | wc -c)"
pattern="$(echo "$pattern" | sed 's/./\0 /g')"

msg_clear
pen
small

# message top left
bottom_screen 82 18

for pixel in $pattern ; do
	# shift mouse 1 pixel right
	xdotool mousemove_relative 1 0

	# skip 0's in $pattern
	[ $pixel -ne 1 ] && continue

	tap
done