about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorDaniel Lublin <daniel@lublin.se>2019-09-20 10:40:54 +0200
committerDaniel Lublin <daniel@lublin.se>2019-09-24 10:35:30 +0200
commit641410f6bd507408749a87ade2f5d6ae05ebaa0b (patch)
tree31176ed527faceb79cb8675b3d69fe7bf871fd60 /src/config
parent8e76283f9743c390bf27c883ef58da79cc4bd2c3 (diff)
downloadprofani-tty-641410f6bd507408749a87ade2f5d6ae05ebaa0b.tar.gz
Add coloring of statusbar.current tab in view
This theme color applies to the tab title text of the statusbar tab that
is currently shown.

The (somewhat confusingly named) `statusbar.active` theme color now
applies to all other tabs (before, it applied to all tabs).

Coloring of a tab that is highlighted/has new messages is done as before
using the `statusbar.new` theme color.

The default color is set to `cyan`, and thus causes no visible change
for users -- until modified.
Diffstat (limited to 'src/config')
-rw-r--r--src/config/theme.c3
-rw-r--r--src/config/theme.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/config/theme.c b/src/config/theme.c
index b4a46a17..329b30e6 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -99,6 +99,7 @@ theme_init(const char *const theme_name)
     g_hash_table_insert(defaults, strdup("statusbar.text"),          strdup("white"));
     g_hash_table_insert(defaults, strdup("statusbar.brackets"),      strdup("cyan"));
     g_hash_table_insert(defaults, strdup("statusbar.active"),        strdup("cyan"));
+    g_hash_table_insert(defaults, strdup("statusbar.current"),       strdup("cyan"));
     g_hash_table_insert(defaults, strdup("statusbar.new"),           strdup("white"));
     g_hash_table_insert(defaults, strdup("statusbar.time"),          strdup("white"));
     g_hash_table_insert(defaults, strdup("me"),                      strdup("yellow"));
@@ -704,6 +705,7 @@ theme_attrs(theme_item_t attrs)
     case THEME_STATUS_TEXT:             _theme_prep_fgnd("statusbar.text",          lookup_str, &bold); break;
     case THEME_STATUS_BRACKET:          _theme_prep_fgnd("statusbar.brackets",      lookup_str, &bold); break;
     case THEME_STATUS_ACTIVE:           _theme_prep_fgnd("statusbar.active",        lookup_str, &bold); break;
+    case THEME_STATUS_CURRENT:          _theme_prep_fgnd("statusbar.current",       lookup_str, &bold); break;
     case THEME_STATUS_NEW:              _theme_prep_fgnd("statusbar.new",           lookup_str, &bold); break;
     case THEME_STATUS_TIME:             _theme_prep_fgnd("statusbar.time",          lookup_str, &bold); break;
     case THEME_ME:                      _theme_prep_fgnd("me",                      lookup_str, &bold); break;
@@ -794,6 +796,7 @@ theme_attrs(theme_item_t attrs)
     case THEME_STATUS_TEXT:
     case THEME_STATUS_BRACKET:
     case THEME_STATUS_ACTIVE:
+    case THEME_STATUS_CURRENT:
     case THEME_STATUS_NEW:
     case THEME_STATUS_TIME:
         _theme_prep_bgnd("statusbar", "blue", lookup_str);
diff --git a/src/config/theme.h b/src/config/theme.h
index cdf6233a..e9444b1c 100644
--- a/src/config/theme.h
+++ b/src/config/theme.h
@@ -68,6 +68,7 @@ typedef enum {
     THEME_STATUS_TEXT,
     THEME_STATUS_BRACKET,
     THEME_STATUS_ACTIVE,
+    THEME_STATUS_CURRENT,
     THEME_STATUS_NEW,
     THEME_STATUS_TIME,
     THEME_ME,