aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-08 08:37:49 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-08 08:37:49 +0200
commit22641740571a7c04186e6cff689f2ac8bbddece7 (patch)
tree76d08d4b10694a03d1fc865b2b889cec71a05c56
parent2e8842a0fff8d2271638e3f5f3f80402ccb46009 (diff)
update bar on title change
-rw-r--r--config.h11
-rw-r--r--dbar.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..edfc824
--- /dev/null
+++ b/config.h
@@ -0,0 +1,11 @@
+#include <stdint.h>
+
+/* The colors are in ARGB format */
+static uint32_t background = 0xff282828;
+static uint32_t foreground = 0xffffffff;
+static uint32_t highlight = 0xffb16286;
+
+static uint32_t height = 30;
+static uint32_t padding = 10;
+static const char *fontpath = "/usr/share/fonts/TTF/Sauce Code Pro Nerd Font Complete Mono.ttf";
+static const char *statusfile = "/tmp/statusline";
diff --git a/dbar.c b/dbar.c
index 9fb44fe..55a0e88 100644
--- a/dbar.c
+++ b/dbar.c
@@ -363,8 +363,8 @@ void
dwl_output_title(void *data, struct zdwl_output_v1 *zdwl_output_v1, const char *title)
{
Bar *bar = data;
-
strncpy(bar->progname, title, 256);
+ update_bar(bar);
}