summaryrefslogtreecommitdiff
path: root/x11-misc/myi3lock/files/pm-utils-lock
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/myi3lock/files/pm-utils-lock')
-rwxr-xr-xx11-misc/myi3lock/files/pm-utils-lock13
1 files changed, 13 insertions, 0 deletions
diff --git a/x11-misc/myi3lock/files/pm-utils-lock b/x11-misc/myi3lock/files/pm-utils-lock
new file mode 100755
index 0000000..901b1b1
--- /dev/null
+++ b/x11-misc/myi3lock/files/pm-utils-lock
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# 10sleep: lock i3 season before suspend
+
+case "$1" in
+ hibernate|suspend)
+ for socket in $(find /run/user/*/i3 /tmp/i3-* -name ipc-socket\* 2>/dev/null); do
+ i3-msg -s $socket "exec myi3lock"
+ done
+ ;;
+ *) exit $NA
+ ;;
+esac