diff --git a/src/colors.h b/src/colors.h new file mode 100644 index 0000000..28e3da8 --- /dev/null +++ b/src/colors.h @@ -0,0 +1,24 @@ +#define wal "/home/anas/.cache/wal/colors-wal-dwm.h" + +#if __has_include(wal) +#include wal +#else +static const char norm_fg[] = "#e4ded4"; +static const char norm_bg[] = "#071F33"; +static const char norm_border[] = "#9f9b94"; + +static const char sel_fg[] = "#e4ded4"; +static const char sel_bg[] = "#3484C8"; +static const char sel_border[] = "#e4ded4"; + +static const char urg_fg[] = "#e4ded4"; +static const char urg_bg[] = "#4F86B6"; +static const char urg_border[] = "#4F86B6"; + +static const char *colors[][3] = { + /* fg bg border */ + [SchemeNorm] = { norm_fg, norm_bg, norm_border }, // unfocused wins + [SchemeSel] = { sel_fg, sel_bg, sel_border }, // the focused win + [schemeurg] = { urg_fg, urg_bg, urg_border }, +}; +#endif diff --git a/src/config.h b/src/config.h index 31ce881..1e3fec2 100644 --- a/src/config.h +++ b/src/config.h @@ -19,15 +19,9 @@ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=11", "Noto Color Emoji:size=11", "Nerd Font Mono:weight=bold:size=15:antialias=true:hinting=true" }; static const char dmenufont[] = "monospace:size=11"; -static const char col_1[] = "#282c34"; // Background color of bar -static const char col_2[] = "#282c34"; // Background color of unfocused windows border -static const char col_3[] = "#d7d7d7"; -static const char col_4[] = "#018858"; // Background color of focused windows border and tags (main color acent) -static const char *colors[][3] = { - /* fg bg border */ - [SchemeNorm] = { col_3, col_1, col_2 }, - [SchemeSel] = { col_3, col_4, col_4 }, -}; + +#include "colors.h" + // Autostart programs static const char *const autostart[] = { // Start my build of slstatus diff --git a/src/dwm.c b/src/dwm.c index 7a0bb05..eb423c5 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -72,7 +72,7 @@ /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum { SchemeNorm, SchemeSel }; /* color schemes */ +enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz, NetWMFullscreen, NetActiveWindow, NetWMWindowType, diff --git a/src/keys/keys.c b/src/keys/keys.c index 7166b9f..2c937f3 100644 --- a/src/keys/keys.c +++ b/src/keys/keys.c @@ -3,7 +3,8 @@ /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_1, "-nf", col_3, "-sb", col_4, "-sf", col_1, NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", norm_bg, + "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL }; static const char *termcmd[] = { TERMINAL, NULL }; /* key definitions */