This commit is contained in:
Christopher Jeffrey 2014-08-18 20:41:29 -07:00
parent 6f03e7c221
commit bde8ad395e
2 changed files with 9 additions and 2 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
twilio.c
twilio.*

View File

@ -25,6 +25,8 @@
#include <bsd_auth.h>
#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 };