forked from martanne/dvtm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dvtm-v0.15-VisualKeys.diff
47 lines (43 loc) · 1.11 KB
/
dvtm-v0.15-VisualKeys.diff
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
diff --git a/dvtm.c b/dvtm.c
index 2b7ebdc..72b46b3 100644
--- a/dvtm.c
+++ b/dvtm.c
@@ -228,6 +228,7 @@ extern Screen screen;
static unsigned int waw, wah, wax, way;
static Client *clients = NULL;
static char *title;
+static KeyCombo keys;
#include "config.h"
@@ -354,6 +355,16 @@ drawbar(void) {
addstr(layout->symbol);
attrset(TAG_NORMAL);
+ if(keys) {
+ unsigned int keycount = 0;
+ while (keycount < MAX_KEYS && keys[keycount]) {
+ if (keys[keycount] < ' ')
+ printw("^%c", 'a' - 1 + keys[keycount++]);
+ else
+ printw("%c", keys[keycount++]);
+ }
+ }
+
getyx(stdscr, y, x);
(void)y;
int maxwidth = screen.w - x - 2;
@@ -1812,7 +1823,6 @@ parse_args(int argc, char *argv[]) {
int
main(int argc, char *argv[]) {
- KeyCombo keys;
unsigned int key_index = 0;
memset(keys, 0, sizeof(keys));
sigset_t emptyset, blockset;
@@ -1898,6 +1908,9 @@ main(int argc, char *argv[]) {
memset(keys, 0, sizeof(keys));
keypress(code);
}
+ drawbar();
+ if (is_content_visible(sel))
+ wnoutrefresh(sel->window);
}
if (r == 1) /* no data available on pty's */
continue;