diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2014-01-25 00:07:30 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2014-01-25 00:07:30 +0000 |
commit | d7ca0c3e555ef0b5250873ddce48ccf2326b017a (patch) | |
tree | 52fc801f0893eb7752524b2602d420afbda4ed59 /wavemon.c | |
parent | 3645c236e9720deb696e7aebc33cd9a6d8cbbdc6 (diff) | |
download | wavemon-d7ca0c3e555ef0b5250873ddce48ccf2326b017a.tar.gz |
Imported Upstream version 0.7.6upstream/0.7.6
Diffstat (limited to '')
-rw-r--r-- | wavemon.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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) |