forked from jhunt/hatop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HACKING
88 lines (69 loc) · 3.98 KB
/
HACKING
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright (C) 2011 John Feuerstein <[email protected]>
# HATop hacking...
Development: https://github.com/jhunt/hatop
Git: git clone https://github.com/jhunt/hatop.git
*** Screen coordinates:
xmin (0) xmax (>=78)
| |
| | stat
ymin ----+------------------ header ---------------------| idx
(0) | |
| | 0
| info display | [..]
| | 42
| | 43
hpos ----|------------------ columns --------------------| 44
| | 45
= smin ====|= 0.- cmin ===================================|==== 46 = vmin
^ | 1 \ | 47
| | 2 | | 48
| | 3 | | 49
| | 4 |-> screen lines | 50
|-> span | 5 | | 51
| | 6 | | 52
| | 7 | stat display | 53
| | 8 | | 54
| | 9 | | 55
| | 10 | | 56
| cpos ----|- 11 | ------------ cursor --------------------|---- 57 - vpos
| | 12 | | 58
| | 13 | | 59
| | 14 | | 60
| | 15 / | 61
= smax ====|= 16'- cmax ===================================|==== 62 - vmax
| | 63
ymax ----+------------------- footer --------------------' [..]
(>=20)
Smin/max = Screen position
Cmin/max/pos = Curser position
Vmin/max/pos = Virtual position
Dynamic positions:
smin = hpos + 2
smax = ymax - 2
cmax = smax - smin (or last stat slice from vmin to end of list)
vpos = vmin + cpos
vmax = vmin + cmax
span = smax - smin
- stat lines represent the whole set of parsed service stats
- screen lines represent a subset of stat lines which are on screen
*** ScreenCLI INPUT coordinates:
screen.xmin screen.xmax
. .
. .
| |
| |
| |<---------------- ispan ------------------>| |
| | | |
|imin ipos imax|
| | | | |
| [*****************|*************************]-----> input line
| | | | | (at screen.smax)
+-|-----------------|-------------------------|-+
| | |
[..., ..., .|., ..., ..., ...,|..., ..., ..., ..., ..., |.., ..., ...] ibuf
| | | | |
| ibmin ibpos ibmax |
| |
|<--------------------------- iblen -------------------------------->|
Imin/max/pos = Input position (*on screen*)
IBmin/pos/max = Input buffer position