diff options
author | Andrés <andmarti@gmail.com> | 2021-03-13 00:37:01 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-03-13 00:37:01 -0300 |
commit | 58863f09be7d8839f52b2264ec709c8be5ff1bc2 (patch) | |
tree | ac0b219de828e96005ffe29c4868ee4076cb07d4 /src/tui.c | |
parent | 8274b7f0580cf95a157fb7a2bf68a50100c30ac8 (diff) |
Added new 'input_bar_bottom' configuration variable
Diffstat (limited to 'src/tui.c')
-rw-r--r-- | src/tui.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -116,10 +116,8 @@ void ui_start_screen() { sstdout = newterm(NULL, stdout, stdin); set_term(sstdout); - //main_win = newwin(LINES - RESROW, COLS, RESROW, 0); - //input_win = newwin(RESROW, COLS, 0, 0); // just 2 rows (RESROW = 2) - main_win = newwin(LINES - RESROW, COLS, 0, 0); - input_win = newwin(RESROW, COLS, LINES-RESROW, 0); + main_win = newwin(LINES - RESROW, COLS, atoi(get_conf_value("input_bar_bottom")) ? 0 : RESROW, 0); + input_win = newwin(RESROW, COLS, atoi(get_conf_value("input_bar_bottom")) ? LINES-RESROW : 0, 0); #ifdef USECOLORS if (has_colors()) { @@ -1413,3 +1411,14 @@ void ui_resume() { ui_update(TRUE); return; } + +/** + * \brief + * UI function thats moves input bar to bottom or back to the top + * \return none + */ +void ui_mv_bottom_bar() { + mvwin(main_win, atoi(get_conf_value("input_bar_bottom")) ? 0 : RESROW, 0); + mvwin(input_win, atoi(get_conf_value("input_bar_bottom")) ? LINES-RESROW : 0, 0); + return; +} |