summaryrefslogtreecommitdiff
path: root/sys-power/pm-i3lock/files/10lock
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-08-09 13:03:04 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-08-09 13:03:04 +0200
commitaf4f2782bfbd434facffca49f99faee812598f08 (patch)
treede27787b3a619849d7a0f57f1d37ab70a9c76b1f /sys-power/pm-i3lock/files/10lock
parent77cab473ce5d57b0ddb487dc920e02cce82af4c2 (diff)
downloadgentoo-personal-overlay-af4f2782bfbd434facffca49f99faee812598f08.tar.gz
gentoo-personal-overlay-af4f2782bfbd434facffca49f99faee812598f08.tar.bz2
gentoo-personal-overlay-af4f2782bfbd434facffca49f99faee812598f08.zip
sys-power/pm-i3lock: fix build
Diffstat (limited to 'sys-power/pm-i3lock/files/10lock')
-rwxr-xr-xsys-power/pm-i3lock/files/10lock13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys-power/pm-i3lock/files/10lock b/sys-power/pm-i3lock/files/10lock
new file mode 100755
index 0000000..109dbfe
--- /dev/null
+++ b/sys-power/pm-i3lock/files/10lock
@@ -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 i3lock-lnxpcs"
+ done
+ ;;
+ *) exit $NA
+ ;;
+esac