summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/output.c8
-rw-r--r--src/print_eth_info.c4
-rw-r--r--src/print_run_watch.c2
-rw-r--r--src/print_wireless_info.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/output.c b/src/output.c
index 3d6666e..c0c1480 100644
--- a/src/output.c
+++ b/src/output.c
@@ -21,9 +21,9 @@ char *color(const char *colorstr) {
return colorbuf;
}
if (output_format == O_DZEN2)
- (void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", colorstr);
+ (void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", cfg_getstr(cfg_general, colorstr));
else if (output_format == O_XMOBAR)
- (void)snprintf(colorbuf, sizeof(colorbuf), "<fc=%s>", colorstr);
+ (void)snprintf(colorbuf, sizeof(colorbuf), "<fc=%s>", cfg_getstr(cfg_general, colorstr));
return colorbuf;
}
@@ -40,9 +40,9 @@ char *endcolor() {
void print_seperator() {
if (output_format == O_DZEN2)
- printf("^fg(#333333)^p(5;-2)^ro(2)^p()^fg()^p(5)");
+ printf("^fg(%s)^p(5;-2)^ro(2)^p()^fg()^p(5)", cfg_getstr(cfg_general, "color_separator"));
else if (output_format == O_XMOBAR)
- printf("<fc=#333333> | </fc>");
+ printf("<fc=%s> | </fc>", cfg_getstr(cfg_general, "color_separator"));
else if (output_format == O_NONE)
printf(" | ");
}
diff --git a/src/print_eth_info.c b/src/print_eth_info.c
index 9ad9b92..28ba6c1 100644
--- a/src/print_eth_info.c
+++ b/src/print_eth_info.c
@@ -79,12 +79,12 @@ void print_eth_info(const char *interface, const char *format_up, const char *fo
const char *ip_address = get_ip_addr(interface);
if (ip_address == NULL) {
- printf("%s", color("#FF0000"));
+ printf("%s", color("color_bad"));
printf("%s", format_down);
(void)printf("%s", endcolor());
return;
} else {
- printf("%s", color("#00FF00"));
+ printf("%s", color("color_good"));
}
for (walk = format_up; *walk != '\0'; walk++) {
diff --git a/src/print_run_watch.c b/src/print_run_watch.c
index 807e322..455130e 100644
--- a/src/print_run_watch.c
+++ b/src/print_run_watch.c
@@ -6,7 +6,7 @@ void print_run_watch(const char *title, const char *pidfile, const char *format)
bool running = process_runs(pidfile);
const char *walk;
- printf("%s", (running ? color("#00FF00") : color("#FF0000")));
+ printf("%s", (running ? color("color_good") : color("color_bad")));
for (walk = format; *walk != '\0'; walk++) {
if (*walk != '%') {
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index 22a9c31..60eb906 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -143,11 +143,11 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
if (get_wireless_info(interface, &info)) {
walk = format_up;
if (info.flags & WIRELESS_INFO_FLAG_HAS_QUALITY)
- printf("%s", info.quality < info.quality_average ? color("#FFFF00") : color("#00FF00"));
+ printf("%s", info.quality < info.quality_average ? color("color_degraded") : color("color_good"));
}
else {
walk = format_down;
- printf("%s", color("#FF0000"));
+ printf("%s", color("color_bad"));
}
for (; *walk != '\0'; walk++) {