diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-10-05 22:03:59 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-10-05 22:03:59 -0600 |
commit | 0ab1ed6530a3891cbf1d9d2943b20f386e0e4a98 (patch) | |
tree | 17062b4cead0618f4871c46a060b1ce28333be7f | |
parent | f695674361d15a312eed2234e8d21a5e03719559 (diff) |
add macro to configure colors
Closes: https://github.com/djpohly/dwl/issues/466
-rw-r--r-- | config.def.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config.def.h b/config.def.h index 1677f6f..9e0c293 100644 --- a/config.def.h +++ b/config.def.h @@ -1,11 +1,15 @@ +#define COLOR(hex) { ((hex >> 24) & 0xFF) / 255.0f, \ + ((hex >> 16) & 0xFF) / 255.0f, \ + ((hex >> 8) & 0xFF) / 255.0f, \ + (hex & 0xFF) / 255.0f } /* appearance */ static const int sloppyfocus = 1; /* focus follows mouse */ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ static const unsigned int borderpx = 1; /* border pixel of windows */ -static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0}; -static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0}; +static const float bordercolor[] = COLOR(0x808080ff); +static const float focuscolor[] = COLOR(0xff0000ff); /* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */ -static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; +static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */ /* tagging - tagcount must be no greater than 31 */ #define TAGCOUNT (9) |