updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / htop-vi / htop-vi.patch
blobf0bb899a0a6d5b67b491da3c18d75c8b4e6966f2
1 diff -crB htop/src/htop-1.0/htop.c htop-vi/src/htop-1.0/htop.c
2 *** htop/src/htop-1.0/htop.c 2011-11-20 21:48:11.000000000 -0500
3 --- htop-vi/src/htop-1.0/htop.c 2012-01-21 21:41:01.515904744 -0500
4 ***************
5 *** 114,126 ****
6 mvaddstr(7, 0, "In monochrome, meters are displayed through different chars, in order: |#*@$%&");
8 mvaddstr( 8, 0, " Status: R: running; S: sleeping; T: traced/stopped; Z: zombie; D: disk sleep");
9 ! mvaddstr( 9, 0, " Arrows: scroll process list F5 t: tree view");
10 mvaddstr(10, 0, " Digits: incremental PID search u: show processes of a single user");
11 mvaddstr(11, 0, " F3 /: incremental name search H: hide/show user threads");
12 mvaddstr(12, 0, " F4 \\: incremental name filtering K: hide/show kernel threads");
13 mvaddstr(13, 0, " Space: tag processes F: cursor follows process");
14 mvaddstr(14, 0, " U: untag all processes + -: expand/collapse tree");
15 ! mvaddstr(15, 0, " F9 k: kill process/tagged processes P: sort by CPU%");
16 mvaddstr(16, 0, " ] F7: higher priority (root only) M: sort by MEM%");
17 mvaddstr(17, 0, " [ F8: lower priority (+ nice) T: sort by TIME");
18 #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
19 --- 114,126 ----
20 mvaddstr(7, 0, "In monochrome, meters are displayed through different chars, in order: |#*@$%&");
22 mvaddstr( 8, 0, " Status: R: running; S: sleeping; T: traced/stopped; Z: zombie; D: disk sleep");
23 ! mvaddstr( 9, 0, " hjkl: scroll process list F5 t: tree view");
24 mvaddstr(10, 0, " Digits: incremental PID search u: show processes of a single user");
25 mvaddstr(11, 0, " F3 /: incremental name search H: hide/show user threads");
26 mvaddstr(12, 0, " F4 \\: incremental name filtering K: hide/show kernel threads");
27 mvaddstr(13, 0, " Space: tag processes F: cursor follows process");
28 mvaddstr(14, 0, " U: untag all processes + -: expand/collapse tree");
29 ! mvaddstr(15, 0, " F9 d: kill process/tagged processes P: sort by CPU%");
30 mvaddstr(16, 0, " ] F7: higher priority (root only) M: sort by MEM%");
31 mvaddstr(17, 0, " [ F8: lower priority (+ nice) T: sort by TIME");
32 #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
33 ***************
34 *** 130,146 ****
35 #endif
36 mvaddstr(18, 0, " I: invert sort order");
37 mvaddstr(19, 0, " F2 S: setup F6 >: select sort column");
38 ! mvaddstr(20, 0, " F1 h: show this help screen l: list open files with lsof");
39 mvaddstr(21, 0, " F10 q: quit s: trace syscalls with strace");
41 attrset(CRT_colors[HELP_BOLD]);
42 ! mvaddstr( 9, 0, " Arrows"); mvaddstr( 9,40, " F5 t");
43 mvaddstr(10, 0, " Digits"); mvaddstr(10,40, " u");
44 mvaddstr(11, 0, " F3 /"); mvaddstr(11,40, " H");
45 mvaddstr(12, 0, " F4 \\"); mvaddstr(12,40, " K");
46 mvaddstr(13, 0, " Space"); mvaddstr(13,40, " F");
47 mvaddstr(14, 0, " U"); mvaddstr(14,40, " + -");
48 ! mvaddstr(15, 0, " F9 k"); mvaddstr(15,40, " P");
49 mvaddstr(16, 0, " ] F7"); mvaddstr(16,40, " M");
50 mvaddstr(17, 0, " [ F8"); mvaddstr(17,40, " T");
51 mvaddstr(18,40, " F4 I");
52 --- 130,146 ----
53 #endif
54 mvaddstr(18, 0, " I: invert sort order");
55 mvaddstr(19, 0, " F2 S: setup F6 >: select sort column");
56 ! mvaddstr(20, 0, " F1 ?: show this help screen L: list open files with lsof");
57 mvaddstr(21, 0, " F10 q: quit s: trace syscalls with strace");
59 attrset(CRT_colors[HELP_BOLD]);
60 ! mvaddstr( 9, 0, " hjkl"); mvaddstr( 9,40, " F5 t");
61 mvaddstr(10, 0, " Digits"); mvaddstr(10,40, " u");
62 mvaddstr(11, 0, " F3 /"); mvaddstr(11,40, " H");
63 mvaddstr(12, 0, " F4 \\"); mvaddstr(12,40, " K");
64 mvaddstr(13, 0, " Space"); mvaddstr(13,40, " F");
65 mvaddstr(14, 0, " U"); mvaddstr(14,40, " + -");
66 ! mvaddstr(15, 0, " F9 d"); mvaddstr(15,40, " P");
67 mvaddstr(16, 0, " ] F7"); mvaddstr(16,40, " M");
68 mvaddstr(17, 0, " [ F8"); mvaddstr(17,40, " T");
69 mvaddstr(18,40, " F4 I");
70 ***************
71 *** 149,155 ****
72 mvaddstr(18, 0, " a:");
73 #endif
74 mvaddstr(19, 0, " F2 S"); mvaddstr(19,40, " F6 >");
75 ! mvaddstr(20, 0, " ? F1 h"); mvaddstr(20,40, " l");
76 mvaddstr(21, 0, " F10 q"); mvaddstr(21,40, " s");
77 attrset(CRT_colors[DEFAULT_COLOR]);
79 --- 149,155 ----
80 mvaddstr(18, 0, " a:");
81 #endif
82 mvaddstr(19, 0, " F2 S"); mvaddstr(19,40, " F6 >");
83 ! mvaddstr(20, 0, " ? F1 ?"); mvaddstr(20,40, " L");
84 mvaddstr(21, 0, " F10 q"); mvaddstr(21,40, " s");
85 attrset(CRT_colors[DEFAULT_COLOR]);
87 ***************
88 *** 647,653 ****
89 break;
91 case KEY_F(1):
92 - case 'h':
93 case '?':
95 showHelp(pl);
96 --- 647,652 ----
97 ***************
98 *** 680,686 ****
99 CRT_enableDelay();
100 break;
102 ! case 'l':
104 OpenFilesScreen* ts = OpenFilesScreen_new((Process*) Panel_getSelected(panel));
105 OpenFilesScreen_run(ts);
106 --- 679,685 ----
107 CRT_enableDelay();
108 break;
110 ! case 'L':
112 OpenFilesScreen* ts = OpenFilesScreen_new((Process*) Panel_getSelected(panel));
113 OpenFilesScreen_run(ts);
114 ***************
115 *** 741,747 ****
116 break;
118 case KEY_F(9):
119 ! case 'k':
121 if (!killPanel) {
122 killPanel = (Panel*) SignalsPanel_new(0, 0, 0, 0);
123 --- 740,746 ----
124 break;
126 case KEY_F(9):
127 ! case 'd':
129 if (!killPanel) {
130 killPanel = (Panel*) SignalsPanel_new(0, 0, 0, 0);
131 diff -crB htop/src/htop-1.0/Panel.c htop-vi/src/htop-1.0/Panel.c
132 *** htop/src/htop-1.0/Panel1.c 2011-11-17 18:47:15.000000000 -0500
133 --- htop-vi/src/htop-1.0/Panel.c 2012-01-21 21:44:01.697331853 -0500
134 ***************
135 *** 336,346 ****
136 --- 336,348 ----
137 assert (this != NULL);
138 switch (key) {
139 case KEY_DOWN:
140 + case 'j':
141 case KEY_CTRLN:
142 if (this->selected + 1 < Vector_size(this->items))
143 this->selected++;
144 return true;
145 case KEY_UP:
146 + case 'k':
147 case KEY_CTRLP:
148 if (this->selected > 0)
149 this->selected--;
150 ***************
151 *** 368,373 ****
152 --- 370,376 ----
153 return true;
154 #endif
155 case KEY_LEFT:
156 + case 'h':
157 case KEY_CTRLB:
158 if (this->scrollH > 0) {
159 this->scrollH -= 5;
160 ***************
161 *** 375,380 ****
162 --- 378,384 ----
164 return true;
165 case KEY_RIGHT:
166 + case 'l':
167 case KEY_CTRLF:
168 this->scrollH += 5;
169 this->needsRedraw = true;