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 };