From 41026346fd2ece85c2d313dc5c4daccc5033bf33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 9 Aug 2018 12:56:26 +0200 Subject: Add sys-power/pm-i3lock package --- sys-power/pm-i3lock/file/10lock | 13 +++++++++++++ sys-power/pm-i3lock/pm-i3lock-1.0.ebuild | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 sys-power/pm-i3lock/file/10lock create mode 100644 sys-power/pm-i3lock/pm-i3lock-1.0.ebuild (limited to 'sys-power') diff --git a/sys-power/pm-i3lock/file/10lock b/sys-power/pm-i3lock/file/10lock new file mode 100644 index 0000000..109dbfe --- /dev/null +++ b/sys-power/pm-i3lock/file/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 diff --git a/sys-power/pm-i3lock/pm-i3lock-1.0.ebuild b/sys-power/pm-i3lock/pm-i3lock-1.0.ebuild new file mode 100644 index 0000000..e8e9072 --- /dev/null +++ b/sys-power/pm-i3lock/pm-i3lock-1.0.ebuild @@ -0,0 +1,18 @@ +EAPI=6 + +DESCRIPTION="pm-utils hook to lock all i3 sessions on suspend" +HOMEPAGE="http://git.cynerd.cz/gentoo-personal-overlay/" +S="${WORKDIR}" + +LICENSE="GPL-3.0+" +SLOT="0" +KEYWORDS="amd64 x86" + +RDEPEND=" + x11-misc/i3lock + sys-power/pm-utils" + +src_install() { + exeinto /etc/pm/sleep.d + doexe "${FILESDIR}/10lock" +} -- cgit v1.2.3