From 44ca4799749aad25913b4d0cb2b21ed5f7c11d17 Mon Sep 17 00:00:00 2001 From: "franck.stauffer" <franck.stauffer@monaco.mc> Date: Wed, 16 Jun 2021 22:27:04 +0200 Subject: [PATCH] Disables DPMS and Screensaver --- config.mk | 2 +- dwm.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config.mk b/config.mk index 9febfcc..c44c250 100644 --- a/config.mk +++ b/config.mk @@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 # includes and libs INCS = -I${X11INC} -I${FREETYPEINC} -LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} +LIBS = -L${X11LIB} -lX11 -lXext ${XINERAMALIBS} ${FREETYPELIBS} # flags CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -D_FORTIFY_SOURCE=2 diff --git a/dwm.c b/dwm.c index b0df2b9..b499c01 100644 --- a/dwm.c +++ b/dwm.c @@ -26,6 +26,7 @@ #include <X11/Xutil.h> #include <X11/cursorfont.h> #include <X11/keysym.h> +#include <X11/extensions/dpms.h> #include <errno.h> #include <locale.h> #include <signal.h> @@ -2984,6 +2985,8 @@ main(int argc, char* argv[]) die("pledge"); #endif /* __OpenBSD__ */ scan(); + XSetScreenSaver(dpy, 0, 600, 1, 1); + DPMSDisable(dpy); run(); cleanup(); XCloseDisplay(dpy);