File: HACKING

package info (click to toggle)
hatop 0.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 632 kB
  • sloc: python: 1,794; sh: 152; makefile: 75
file content (88 lines) | stat: -rw-r--r-- 4,073 bytes parent folder | download | duplicates (3)
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
88
# Copyright (C) 2011 John Feuerstein <john@feurix.com>
# 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