hint for x11 gnuplot windows
[cheali-logview-gnuplot] / logview-scope.sh
1 #!/bin/sh -xe
2
3 # .i3/config
4 # for_window[title="^Gnuplot"] floating enable
5
6 # http://users.softlab.ntua.gr/~ttsiod/gnuplotStreaming.html
7 test -x driveGnuPlots.pl || wget http://users.softlab.ntua.gr/~ttsiod/driveGnuPlots.pl && chmod 755 driveGnuPlots.pl
8
9 width=120
10
11 #tail -f `ls -t log/*.log | head -1` \
12 cat `ls -t log/*.log | head -1` \
13 | grep '$1' | cut -d\; -f \
14 4,5,6,\
15 10,11,\
16 12,13,14,15,16,17,\
17 18,19,20,21,22,23,\
18 24,25,26,27,28 \
19 | sed \
20 -e 's/^/0:/' \
21 -e 's/;/\n1:/' \
22 -e 's/;/\n2:/' \
23 -e 's/;/\n3:/' \
24 -e 's/;/\n4:/' \
25 -e 's/;/\n5:/' \
26 -e 's/;/\n6:/' \
27 -e 's/;/\n7:/' \
28 -e 's/;/\n8:/' \
29 -e 's/;/\n9:/' \
30 -e 's/;/\n10:/' \
31 -e 's/;/\n11:/' \
32 -e 's/;/\n12:/' \
33 -e 's/;/\n13:/' \
34 -e 's/;/\n14:/' \
35 -e 's/;/\n15:/' \
36 -e 's/;/\n16:/' \
37 -e 's/;/\n17:/' \
38 -e 's/;/\n18:/' \
39 -e 's/;/\n19:/' \
40 -e 's/;/\n20:/' \
41 -e 's/;/\n21:/' \
42 -e 's/;/\n22:/' \
43 | \
44 ./driveGnuPlots.pl 22 \
45 $width $width $width \
46 $width $width \
47 $width $width $width $width $width $width \
48 $width $width $width $width $width $width \
49 $width $width $width $width $width \
50 V mA mAh \
51 temp Vinput \
52 v1 v2 v3 v4 v5 v6 \
53 r1 r2 r3 r4 r5 r6 \
54 Rbat Rwire Z AA AB \
55 320x200+1200+500 \
56 320x200+1200+850 \
57 320x200+1200+1200 \
58 320x200+1550+500 \
59 320x200+1550+850 \
60 400x175+1900+450 \
61 400x175+1900+650 \
62 400x175+1900+850 \
63 400x175+1900+1050 \
64 400x100+1900+1250 \
65 400x100+1900+1400 \
66 400x175+2300+450 \
67 400x175+2300+650 \
68 400x175+2300+850 \
69 400x175+2300+1050 \
70 400x100+2300+1250 \
71 400x100+2300+1400 \
72 400x175+2700+450 \
73 400x175+2700+650 \
74 400x175+2700+850 \
75 400x175+2700+1050 \
76 400x175+2700+1250 \
77 2>/dev/null
78
79 # leave empty line bove this one
80