diff options
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) |