From 98aa59fdda5fcc9a589e93f7c6ef40d3eaee3972 Mon Sep 17 00:00:00 2001 From: Zandr Martin Date: Sat, 30 Jul 2016 18:50:13 -0500 Subject: implement solid color rendering for swaybg --- swaybar/config.c | 13 ------------- swaybar/status_line.c | 1 + 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'swaybar') diff --git a/swaybar/config.c b/swaybar/config.c index f3a3e716..b5dca668 100644 --- a/swaybar/config.c +++ b/swaybar/config.c @@ -5,19 +5,6 @@ #include "log.h" #include "bar/config.h" -uint32_t parse_color(const char *color) { - if (color[0] != '#') { - sway_log(L_DEBUG, "Invalid color %s, defaulting to color 0xFFFFFFFF", color); - return 0xFFFFFFFF; - } - char *end; - uint32_t res = (uint32_t)strtol(color + 1, &end, 16); - if (strlen(color) == 7) { - res = (res << 8) | 0xFF; - } - return res; -} - uint32_t parse_position(const char *position) { if (strcmp("top", position) == 0) { return DESKTOP_SHELL_PANEL_POSITION_TOP; diff --git a/swaybar/status_line.c b/swaybar/status_line.c index 49a8363a..33a8908f 100644 --- a/swaybar/status_line.c +++ b/swaybar/status_line.c @@ -6,6 +6,7 @@ #include "log.h" #include "bar/config.h" #include "bar/status_line.h" +#include "util.h" #define I3JSON_MAXDEPTH 4 #define I3JSON_UNKNOWN 0 -- cgit v1.2.3-70-g09d2