diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-08-26 18:11:53 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-08-26 18:11:53 +0200 |
commit | d9a9d2489adb3cbaf47d9c7696df956af30afe38 (patch) | |
tree | 01e70315d5de17825c9cdd22e356c503e11f3579 /source/x11-helper.c | |
parent | d6762328468dce28c925f24cf543cd18bfd141b1 (diff) |
Add separator color and style option.
Diffstat (limited to 'source/x11-helper.c')
-rw-r--r-- | source/x11-helper.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/source/x11-helper.c b/source/x11-helper.c index 5bd1c675..d8b9ec2f 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -537,7 +537,7 @@ unsigned int color_background ( Display *display ) else { unsigned int retv = 0; - gchar **vals = g_strsplit ( config.color_window, ",", 2 ); + gchar **vals = g_strsplit ( config.color_window, ",", 3 ); if ( vals != NULL && vals[0] != NULL ) { retv = color_get ( display, g_strstrip ( vals[0] ), "black" ); } @@ -554,7 +554,7 @@ unsigned int color_border ( Display *display ) else { unsigned int retv = 0; - gchar **vals = g_strsplit ( config.color_window, ",", 2 ); + gchar **vals = g_strsplit ( config.color_window, ",", 3 ); if ( vals != NULL && vals[0] != NULL && vals[1] != NULL ) { retv = color_get ( display, vals[1], "white" ); } @@ -562,3 +562,23 @@ unsigned int color_border ( Display *display ) return retv; } } + +unsigned int color_separator ( Display *display ) +{ + if ( !config.color_enabled ) { + return color_get ( display, config.menu_bc, "white" ); + } + else { + unsigned int retv = 0; + + gchar **vals = g_strsplit ( config.color_window, ",", 3 ); + if ( vals != NULL && vals[0] != NULL && vals[1] != NULL && vals[2] != NULL ) { + retv = color_get ( display, vals[2], "white" ); + } + else if ( vals != NULL && vals[0] != NULL && vals[1] != NULL ) { + retv = color_get ( display, vals[1], "white" ); + } + g_strfreev ( vals ); + return retv; + } +} |