summaryrefslogtreecommitdiffstats
path: root/src/tui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui.h')
-rw-r--r--src/tui.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tui.h b/src/tui.h
index 71572ed..fa06c59 100644
--- a/src/tui.h
+++ b/src/tui.h
@@ -14,9 +14,7 @@
void tui_init(void);
void tui_deinit(void);
-
bool tui_update(void);
-void tui_restore(void);
extern struct pane *cmd_pane, *tag_pane, *track_pane;
extern struct pane *pane_sel, *pane_after_cmd;
@@ -30,3 +28,15 @@ extern struct listnav track_nav;
extern char *cmd_status;
extern int cmd_status_uptime;
+static inline bool
+tui_enabled(void)
+{
+ return !isendwin();
+}
+
+static inline void
+tui_restore(void)
+{
+ if (!isendwin())
+ endwin();
+}