twilio
This commit is contained in:
parent
6f03e7c221
commit
bde8ad395e
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
twilio.c
|
twilio.*
|
||||||
|
9
slock.c
9
slock.c
@ -25,6 +25,8 @@
|
|||||||
#include <bsd_auth.h>
|
#include <bsd_auth.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "twilio.h"
|
||||||
|
|
||||||
#define SLOCK_SHUTDOWN 1
|
#define SLOCK_SHUTDOWN 1
|
||||||
|
|
||||||
char *g_pw = NULL;
|
char *g_pw = NULL;
|
||||||
@ -156,7 +158,9 @@ readpw(Display *dpy, const char *pws)
|
|||||||
if(running) {
|
if(running) {
|
||||||
XBell(dpy, 100);
|
XBell(dpy, 100);
|
||||||
lock_tries++;
|
lock_tries++;
|
||||||
#include "twilio.c"
|
#ifdef TWILIO_SEND
|
||||||
|
twilio_send("Bad screenlock password.", 1);
|
||||||
|
#endif
|
||||||
#if SLOCK_SHUTDOWN
|
#if SLOCK_SHUTDOWN
|
||||||
if(lock_tries > 5) {
|
if(lock_tries > 5) {
|
||||||
// Needs sudo privileges for systemctl
|
// Needs sudo privileges for systemctl
|
||||||
@ -210,6 +214,9 @@ readpw(Display *dpy, const char *pws)
|
|||||||
case XK_F11:
|
case XK_F11:
|
||||||
case XK_F12:
|
case XK_F12:
|
||||||
case XK_F13:
|
case XK_F13:
|
||||||
|
#ifdef TWILIO_SEND
|
||||||
|
twilio_send("Bad screenlock key.", 0);
|
||||||
|
#endif
|
||||||
// Needs sudo privileges for systemctl
|
// Needs sudo privileges for systemctl
|
||||||
if (alt_kill) {
|
if (alt_kill) {
|
||||||
char *args[] = { "sudo", "systemctl", "poweroff", NULL };
|
char *args[] = { "sudo", "systemctl", "poweroff", NULL };
|
||||||
|
Loading…
Reference in New Issue
Block a user