Commits

William Giokas committed de7ebc8

Added in config file

I'll make it have the status function too, maybe, though for now I'll
keep that in dwmstatus.c. Configuring these options is good enough for
me.

Signed-off-by: William Giokas <1007380@gmail.com>

  • Participants
  • Parent commits f874889
  • Tags v0.2.2

Comments (0)

Files changed (5)

 SRC = ${NAME}.c
 OBJ = ${SRC:.c=.o}
 DOC = ${NAME}.1
+CONF= config.h
 
 all: options ${NAME}
 
 	@echo creating dist tarball
 	@mkdir -p ${NAME}-${VERSION}
 	@cp -R Makefile config.mk LICENSE \
-		${SRC} ${DOC} ${NAME}-${VERSION}
+		${SRC} ${DOC} ${CONF} ${NAME}-${VERSION}
 	@tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
 	@gzip ${NAME}-${VERSION}.tar
 	@rm -rf ${NAME}-${VERSION}
+/* See LICENSE file for copyright and license details */
+
+/************************
+ * Configuration Options
+ ************************/
+
+/* Specify your timezone: */
+#define TIMEZONE "America/Chicago"
+
+/* Specify network device, usually wlan0 or eth0
+ * systemd has some new naming conventions you can turn on with longer names.
+ */
+#define NET_DEVICE "wlp3s0"
+
+/* Specity path to your battery */
+#define BATT_PATH "/sys/class/power_supply/BAT0"
+
+/* Specify your temperature sensor information. */
+#define TEMP_SENSOR_PATH "/sys/devices/platform/coretemp.0"
+#define TEMP_SENSOR_UNIT "temp1_input"
 NAME = dwmstatus
-VERSION = 0.2.1
+VERSION = 0.2.2
 
 # Customize below to fit your system
 
 .TP
 Run dwbstatus in a shell and it will put its output into the dwm status bar
 area (the right side of the bar by default).
+.SH CONFIG
+.TP
+.B config.h
+This is the config file for dwmstatus. Edit this before compiling to change
+where dwmstatus looks for things.
 .SH SEE ALSO
 .BR dwm (1)
 .SH AUTHORS
 
 #include <X11/Xlib.h>
 
-/************************
- * Configuration Options
- ************************/
-
-/* Specify your timezone: */
-#define TIMEZONE "America/Chicago"
-
-/* Specify network device, usually wlan0 or eth0 */
-#define NET_DEVICE "wlp3s0"
-
-/* Specity path to your battery */
-#define BATT_PATH "/sys/class/power_supply/BAT0"
-
-/* Specify your temperature sensor information. */
-#define TEMP_SENSOR_PATH "/sys/devices/platform/coretemp.0"
-#define TEMP_SENSOR_UNIT "temp1_input"
+#include "config.h"
 
 static Display *dpy;