updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / htop-vi / htop-vi.patch
blob3f3925195eaaa1ed85a225d17de5326fe6e6497f
1 diff -crB htop/src/htop-0.9/htop.c htop-vi/src/htop-0.9/htop.c
2 *** htop/src/htop-0.9/htop.c 2010-11-24 13:45:38.000000000 -0500
3 --- htop-vi/src/htop-0.9/htop.c 2011-01-22 22:55:27.000000000 -0500
4 ***************
5 *** 115,127 ****
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, " 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 #ifdef HAVE_PLPA
19 --- 115,127 ----
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, " 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 #ifdef HAVE_PLPA
33 ***************
34 *** 131,147 ****
35 #endif
36 mvaddstr(18, 0, " F4 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,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 --- 131,147 ----
53 #endif
54 mvaddstr(18, 0, " F4 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,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 *** 150,156 ****
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 --- 150,156 ----
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 *** 558,564 ****
89 break;
91 case KEY_F(1):
92 - case 'h':
93 case '?':
95 showHelp(pl);
96 --- 558,563 ----
97 ***************
98 *** 591,597 ****
99 CRT_enableDelay();
100 break;
102 ! case 'l':
104 OpenFilesScreen* ts = OpenFilesScreen_new((Process*) Panel_getSelected(panel));
105 OpenFilesScreen_run(ts);
106 --- 590,596 ----
107 CRT_enableDelay();
108 break;
110 ! case 'L':
112 OpenFilesScreen* ts = OpenFilesScreen_new((Process*) Panel_getSelected(panel));
113 OpenFilesScreen_run(ts);
114 ***************
115 *** 652,658 ****
116 break;
118 case KEY_F(9):
119 ! case 'k':
121 if (!killPanel) {
122 killPanel = (Panel*) SignalsPanel_new(0, 0, 0, 0);
123 --- 651,657 ----
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-0.9/Panel.c htop-vi/src/htop-0.9/Panel.c
132 *** htop/src/htop-0.9/Panel.c 2010-11-23 10:56:32.000000000 -0500
133 --- htop-vi/src/htop-0.9/Panel.c 2011-01-22 23:00:24.000000000 -0500
134 ***************
135 *** 340,350 ****
136 --- 340,352 ----
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 *** 372,377 ****
152 --- 374,380 ----
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 *** 379,384 ****
162 --- 382,388 ----
164 return true;
165 case KEY_RIGHT:
166 + case 'l':
167 case KEY_CTRLF:
168 this->scrollH += 5;
169 this->needsRedraw = true;