aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-10-19 23:18:47 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-10-19 23:18:47 -0400
commit061085232ef35f956316812806875331f175acf7 (patch)
tree20ba4c170e48387f3f8cc45f45b9e11322bd3db3 /dwm.c
parentfa7e4f7c0b1e5db1c14844535c91661504fd96bb (diff)
downloaddwm-061085232ef35f956316812806875331f175acf7.tar.gz
dwm-061085232ef35f956316812806875331f175acf7.tar.xz
Small patch to allow environment variables to be changed on the fly when DWM is reloaded.
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index cb4113f..8bcd0d2 100644
--- a/dwm.c
+++ b/dwm.c
@@ -43,6 +43,7 @@
#include "drw.h"
#include "util.h"
+#include "util2.h"
/* macros */
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
@@ -2142,6 +2143,11 @@ main(int argc, char *argv[])
if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display");
checkotherwm();
+
+ FILE *fh;
+ if ((fh = fopen(".env", "r")))
+ readEnv(fh);
+
setup();
#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec", NULL) == -1)