aboutsummaryrefslogtreecommitdiffstats
path: root/config.def.mk
blob: 4265c827ab1a8cc14e6f8f68bcd128a5cef5fa1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# dwmclock settings

# enable battery charge display
CFLAGS+=-DBATTERY

# set this to the correct path for your current system
CFLAGS+=-DENERGY_FULL=\"/sys/class/power_supply/BAT0/energy_full\"
CFLAGS+=-DENERGY_NOW=\"/sys/class/power_supply/BAT0/energy_now\"
CFLAGS+=-DSTATUS=\"/sys/class/power_supply/ADP1/online\"

# the string to match when the battery is charging; comment out to disable charging detection
CFLAGS+=-DCHARGING=\"1\\n\"

# possible alternative on some systems
#CFLAGS+=-DENERGY_FULL=\"/sys/class/power_supply/BAT0/charge_full\"
#CFLAGS+=-DENERGY_NOW=\"/sys/class/power_supply/BAT0/charge_now\"
#CFLAGS+=-DSTATUS=\"/sys/class/power_supply/BAT0/status\"
#CFLAGS+=-DCHARGING=\"Charging\\n\"

# every how many seconds to refresh the battery charge display
CFLAGS+=-DBAT_REFRESH_SECONDS=10

# this is here for legacy reasons, ignore it
CFLAGS+=-DMUL=1

# sleep to the start of the next second instead of for 1s
CFLAGS+=-DEXACT_SLEEP


# make settings

# default compiler
CC?=gcc

# compiler flags
CFLAGS+=-std=c99 -Wall -Wextra -pedantic -O2 $(shell pkg-config --cflags x11)
LDFLAGS+=$(shell pkg-config --libs x11)

# default paths
DESTDIR?=/
PREFIX?=/usr/local
#DESTDIR?=~
#PREFIX?=/local