summaryrefslogtreecommitdiffstats
path: root/swaybar/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/config.c')
-rw-r--r--swaybar/config.c13
1 files changed, 0 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
8uint32_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
21uint32_t parse_position(const char *position) { 8uint32_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;