aboutsummaryrefslogtreecommitdiff
path: root/ui/curses
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-03-21 01:36:24 +0100
committerPaul Oliver <contact@pauloliver.dev>2026-04-03 18:50:51 +0200
commitbda5ad2ec9fa333c8200451496d6c251abbeee19 (patch)
tree52e15344f239a023d298ee9635e8c7c0c4fdf614 /ui/curses
parent9f7e70904e6c0fa650323ac5e50ebf6003da333c (diff)
Adds data server (WIP)
Diffstat (limited to 'ui/curses')
-rw-r--r--ui/curses/ui.c12
-rw-r--r--ui/curses/ui_vars.py2
2 files changed, 8 insertions, 6 deletions
diff --git a/ui/curses/ui.c b/ui/curses/ui.c
index faf1b6e..8a2d85a 100644
--- a/ui/curses/ui.c
+++ b/ui/curses/ui.c
@@ -344,7 +344,7 @@ void ui_line(bool clear, int line, int color, int attr, const char *format, ...)
va_start(args, format);
vsnprintf(g_line_buff, COLS, format, args);
- mvprintw(line, 1, g_line_buff);
+ mvprintw(line, 1, "%s", g_line_buff);
va_end(args);
attroff(COLOR_PAIR(color) | attr);
@@ -369,7 +369,7 @@ void ui_field(int line, int col, int color, int attr, const char *format, ...) {
va_start(args, format);
vsnprintf(g_line_buff, COLS - col, format, args);
- mvprintw(line, col, g_line_buff);
+ mvprintw(line, col, "%s", g_line_buff);
va_end(args);
attroff(COLOR_PAIR(color) | attr);
@@ -834,7 +834,7 @@ void ui_print_log_line(unsigned lptr, int line) {
PANE_WIDTH,
PAIR_NORMAL,
A_NORMAL,
- " %d-%02d-%02d %02d:%02d:%02d",
+ " %d-%02d-%02d %02d:%02d:%02d --",
tm.tm_year + 1900,
tm.tm_mon + 1,
tm.tm_mday,
@@ -845,15 +845,15 @@ void ui_print_log_line(unsigned lptr, int line) {
ui_field(
line,
- PANE_WIDTH + 22,
+ PANE_WIDTH + 25,
g_log_warns[lptr] ? PAIR_WARN : PAIR_HEADER,
A_NORMAL,
- g_log_warns[lptr] ? "[WARN]" : "[INFO]"
+ g_log_warns[lptr] ? "WARN" : "INFO"
);
ui_field(
line,
- PANE_WIDTH + 29,
+ PANE_WIDTH + 30,
PAIR_NORMAL,
A_NORMAL,
g_logs[lptr]
diff --git a/ui/curses/ui_vars.py b/ui/curses/ui_vars.py
index 54f62e3..b2462fb 100644
--- a/ui/curses/ui_vars.py
+++ b/ui/curses/ui_vars.py
@@ -1,5 +1,7 @@
class UIVars:
def __init__(self, _):
+ self.flags = set()
self.includes = {"curses.h", "locale.h", "time.h"}
self.defines = {"-DNCURSES_WIDECHAR=1"}
self.links = {"-lncurses"}
+ self.pager = True