if lock tries exceeds 2. play alarm sound.
This commit is contained in:
parent
1ba98464fd
commit
4e7c29374b
8
slock.c
8
slock.c
@ -24,6 +24,7 @@
|
||||
#endif
|
||||
|
||||
char *g_pw = NULL;
|
||||
int lock_tries = 0;
|
||||
|
||||
typedef struct {
|
||||
int screen;
|
||||
@ -147,8 +148,13 @@ readpw(Display *dpy, const char *pws)
|
||||
running = !!strcmp(crypt(passwd, pws), pws);
|
||||
}
|
||||
#endif
|
||||
if(running)
|
||||
if(running) {
|
||||
XBell(dpy, 100);
|
||||
if(++lock_tries > 2) {
|
||||
// http://soundbible.com/1819-Police.html
|
||||
system("aplay /home/chjj/police.wav");
|
||||
}
|
||||
}
|
||||
len = 0;
|
||||
break;
|
||||
case XK_Escape:
|
||||
|
Loading…
Reference in New Issue
Block a user