From bde8ad395e8600f4873a1577f8ebafdf1dbd2d9a Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 18 Aug 2014 20:41:29 -0700 Subject: [PATCH] twilio --- .gitignore | 2 +- slock.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 48dc62a..17f4ad3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -twilio.c +twilio.* diff --git a/slock.c b/slock.c index ba3b51a..6855e1d 100644 --- a/slock.c +++ b/slock.c @@ -25,6 +25,8 @@ #include #endif +#include "twilio.h" + #define SLOCK_SHUTDOWN 1 char *g_pw = NULL; @@ -156,7 +158,9 @@ readpw(Display *dpy, const char *pws) if(running) { XBell(dpy, 100); lock_tries++; - #include "twilio.c" +#ifdef TWILIO_SEND + twilio_send("Bad screenlock password.", 1); +#endif #if SLOCK_SHUTDOWN if(lock_tries > 5) { // Needs sudo privileges for systemctl @@ -210,6 +214,9 @@ readpw(Display *dpy, const char *pws) case XK_F11: case XK_F12: case XK_F13: +#ifdef TWILIO_SEND + twilio_send("Bad screenlock key.", 0); +#endif // Needs sudo privileges for systemctl if (alt_kill) { char *args[] = { "sudo", "systemctl", "poweroff", NULL };