summaryrefslogtreecommitdiffstats
path: root/bin/watch-lock
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-08 23:36:56 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-08 23:36:56 -0400
commit521adc579c34e041192d1429118806a1981dc952 (patch)
treecb464c9a24be850cca8a17dce6ac1f4f6a3130ef /bin/watch-lock
parentd93a6c0155d7d626db4736bb8facc7f6ac2a4280 (diff)
downloadconf-521adc579c34e041192d1429118806a1981dc952.tar.gz
conf-521adc579c34e041192d1429118806a1981dc952.zip
switch to xsecurelock instead of light-locker
Diffstat (limited to 'bin/watch-lock')
-rwxr-xr-xbin/watch-lock37
1 files changed, 0 insertions, 37 deletions
diff --git a/bin/watch-lock b/bin/watch-lock
deleted file mode 100755
index 8545efc..0000000
--- a/bin/watch-lock
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use 5.020;
-
-use POSIX ":sys_wait_h";
-
-$|++;
-
-my $pid = open my $fh, '-|', (
- 'dbus-monitor',
- '--system',
- 'type=signal,interface=org.freedesktop.login1.Session'
-) or die "couldn't spawn dbus-monitor: $!";
-$SIG{CHLD} = sub {
- while ((my $child = waitpid -1, WNOHANG) > 0) {
- if ($child == $pid) {
- undef $pid;
- }
- }
- exit unless $pid;
-};
-
-sub cleanup {
- kill KILL => $pid if $pid;
- undef $pid;
-}
-
-$SIG{TERM} = $SIG{INT} = sub { cleanup; exit; };
-END { cleanup }
-
-while (<$fh>) {
- if (/\bmember=Lock\b/) {
- system("on-lock") && say "on-lock failed";
- say "LOCK";
- }
-}