aboutsummaryrefslogtreecommitdiffstats
path: root/wavemon.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2014-01-25 00:07:31 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2014-01-25 00:07:31 +0000
commitb7fe9575ab40a3bcde643a8ae8750ca6fd2aaad7 (patch)
treed220eddc3489f44845e9855e901290f7f712a626 /wavemon.c
parentbea11309641a93ea51622fc85331d3960011afe4 (diff)
parentd7ca0c3e555ef0b5250873ddce48ccf2326b017a (diff)
downloadwavemon-b7fe9575ab40a3bcde643a8ae8750ca6fd2aaad7.tar.gz
Merge tag 'upstream/0.7.6'
Upstream version 0.7.6
Diffstat (limited to 'wavemon.c')
-rw-r--r--wavemon.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/wavemon.c b/wavemon.c
index f74ec74..6369b81 100644
--- a/wavemon.c
+++ b/wavemon.c
@@ -114,7 +114,16 @@ static WINDOW *init_menubar(const enum wavemon_screen active)
wattrset(menu, cur != active ? COLOR_PAIR(CP_INACTIVE)
: COLOR_PAIR(CP_ACTIVE) | A_BOLD);
- wprintw(menu, "%-6s", screens[cur].key_name);
+ if (*screens[cur].key_name) {
+
+ wattron(menu, A_UNDERLINE);
+ waddch(menu, screens[cur].key_name[0]);
+ wattroff(menu, A_UNDERLINE);
+
+ wprintw(menu, "%-5s", screens[cur].key_name + 1);
+ } else {
+ wprintw(menu, "%-6s", "");
+ }
}
wrefresh(menu);
@@ -131,7 +140,6 @@ static void check_geometry(void)
int main(int argc, char *argv[])
{
- WINDOW *w_menu;
enum wavemon_screen cur, next;
sigset_t blockmask, oldmask;
@@ -145,12 +153,12 @@ int main(int argc, char *argv[])
/* initialize the ncurses interface */
initscr();
- check_geometry();
- cbreak();
noecho();
nonl();
- clear();
+ cbreak();
curs_set(0);
+ clear();
+ check_geometry();
start_color();
init_pair(CP_STANDARD, COLOR_WHITE, COLOR_BLACK);
@@ -183,6 +191,7 @@ int main(int argc, char *argv[])
sigaddset(&blockmask, SIGWINCH);
for (cur = conf.startup_scr; cur != SCR_QUIT; cur = next) {
+ WINDOW *w_menu;
int escape = 0;
if (sigprocmask(SIG_BLOCK, &blockmask, &oldmask) < 0)