diff options
author | 2016-07-30 23:28:02 -0400 | |
---|---|---|
committer | 2016-07-30 23:28:02 -0400 | |
commit | 44a4905466599155fb7203a585dfca1ce1720b33 (patch) | |
tree | a7acb9aab8520040d49be04184d70984a66b95e7 /swaybar | |
parent | Merge pull request #803 from zandrmartin/x11-pids (diff) | |
parent | implement solid color rendering for swaybg (diff) | |
download | sway-44a4905466599155fb7203a585dfca1ce1720b33.tar.gz sway-44a4905466599155fb7203a585dfca1ce1720b33.tar.zst sway-44a4905466599155fb7203a585dfca1ce1720b33.zip |
implement solid color rendering for swaybg
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/config.c | 13 | ||||
-rw-r--r-- | swaybar/status_line.c | 1 |
2 files changed, 1 insertions, 13 deletions
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 @@ | |||
5 | #include "log.h" | 5 | #include "log.h" |
6 | #include "bar/config.h" | 6 | #include "bar/config.h" |
7 | 7 | ||
8 | uint32_t parse_color(const char *color) { | ||
9 | if (color[0] != '#') { | ||
10 | sway_log(L_DEBUG, "Invalid color %s, defaulting to color 0xFFFFFFFF", color); | ||
11 | return 0xFFFFFFFF; | ||
12 | } | ||
13 | char *end; | ||
14 | uint32_t res = (uint32_t)strtol(color + 1, &end, 16); | ||
15 | if (strlen(color) == 7) { | ||
16 | res = (res << 8) | 0xFF; | ||
17 | } | ||
18 | return res; | ||
19 | } | ||
20 | |||
21 | uint32_t parse_position(const char *position) { | 8 | uint32_t parse_position(const char *position) { |
22 | if (strcmp("top", position) == 0) { | 9 | if (strcmp("top", position) == 0) { |
23 | return DESKTOP_SHELL_PANEL_POSITION_TOP; | 10 | 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 @@ | |||
6 | #include "log.h" | 6 | #include "log.h" |
7 | #include "bar/config.h" | 7 | #include "bar/config.h" |
8 | #include "bar/status_line.h" | 8 | #include "bar/status_line.h" |
9 | #include "util.h" | ||
9 | 10 | ||
10 | #define I3JSON_MAXDEPTH 4 | 11 | #define I3JSON_MAXDEPTH 4 |
11 | #define I3JSON_UNKNOWN 0 | 12 | #define I3JSON_UNKNOWN 0 |