mirror of https://github.com/9wm/xss.git
add xnolock program
This commit is contained in:
parent
ebea23e5c0
commit
cfe9ab22e3
4
Makefile
4
Makefile
|
@ -3,7 +3,7 @@ BINDIR ?= $(HOME)/bin/$(HOSTTYPE)
|
|||
CFLAGS = -Wall
|
||||
LDLIBS = -L/usr/X11R6/lib -lX11
|
||||
|
||||
BINARIES = xss xsswin xcursorpos xkeygrab xbell magic
|
||||
BINARIES = xss xsswin xcursorpos xkeygrab xbell magic xnolock
|
||||
|
||||
all: $(BINARIES)
|
||||
|
||||
|
@ -13,6 +13,6 @@ install: $(BINARIES)
|
|||
clean:
|
||||
rm -f $(BINARIES)
|
||||
|
||||
xss: LDLIBS += -lXss
|
||||
xss xnolock: LDLIBS += -lXss
|
||||
|
||||
.PHONY: all install clean
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/scrnsaver.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
Display *display = XOpenDisplay(NULL);
|
||||
|
||||
XScreenSaverSuspend(display, True);
|
||||
XFlush(display);
|
||||
pause();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue