diff options
author | James Booth <boothj5@gmail.com> | 2018-03-08 22:27:49 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2018-03-08 22:27:49 +0000 |
commit | 720dce866eb759a7b5ecdaff7c7d9ceeb6e2487c (patch) | |
tree | 8f9e072c17a0d8ecb8acefd97f304015442fd694 /src/command/cmd_funcs.c | |
parent | 119c5650cf1b40d3074faae1a280e8d3dfbedc03 (diff) | |
download | profani-tty-720dce866eb759a7b5ecdaff7c7d9ceeb6e2487c.tar.gz |
Add prefs for empty tabs and tab names
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index b4840afd..1e5b3b55 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -5792,6 +5792,44 @@ cmd_mainwin(ProfWin *window, const char *const command, gchar **args) gboolean cmd_statusbar(ProfWin *window, const char *const command, gchar **args) { + if (g_strcmp0(args[0], "show") == 0) { + if (g_strcmp0(args[1], "empty") == 0) { + prefs_set_boolean(PREF_STATUSBAR_SHOW_EMPTY, TRUE); + cons_show("Enabled showing empty tabs."); + ui_resize(); + return TRUE; + } + if (g_strcmp0(args[1], "name") == 0) { + prefs_set_boolean(PREF_STATUSBAR_SHOW_NAME, TRUE); + cons_show("Enabled showing tab names."); + ui_resize(); + return TRUE; + } + cons_bad_cmd_usage(command); + return TRUE; + } + + if (g_strcmp0(args[0], "hide") == 0) { + if (g_strcmp0(args[1], "empty") == 0) { + prefs_set_boolean(PREF_STATUSBAR_SHOW_EMPTY, FALSE); + cons_show("Disabled showing empty tabs."); + ui_resize(); + return TRUE; + } + if (g_strcmp0(args[1], "name") == 0) { + prefs_set_boolean(PREF_STATUSBAR_SHOW_NAME, FALSE); + cons_show("Disabled showing tab names."); + ui_resize(); + return TRUE; + } + cons_bad_cmd_usage(command); + return TRUE; + } + + if (g_strcmp0(args[0], "maxtabs") == 0) { + + } + if (g_strcmp0(args[0], "up") == 0) { gboolean result = prefs_statusbar_pos_up(); if (result) { |