weirdnet
weirdnet.org
Home
Strangeland
Directory
Links

Alternative à xautolock

« back to Strangeland


---
layout: project
title: "Alternative à xautolock"
date: 2014-04-19 18:11:08 +0200
---

\> # alternative to xautolock using sinac to launch display locker
\> # source: http://martin.kopta.eu/blog/#2014-05-02-11-28-35
\> wget http://lists.suckless.org/dwm/att-4685/sinac.c
\> gcc sinac.c -Wall -L/usr/X11R6/lib -lX11 -lXss -lXext -o sinac
sinac.c: In function 'main':
sinac.c:54:7: warning: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
sinac.c:74:5: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat]
sinac.c:49:8: warning: unused variable 'idleTime' [-Wunused-variable]
\> sudo chown root:root sinac && sudo mv sinac /usr/local/bin/
\> grep -A2 sinac ~/.xinitrc
if [ -x /usr/local/bin/sinac ] && [ "$(sinac -p)" -gt 300 ]; then
slock
fi
\> _