diff options
author | Karel Kočí <karel.koci@nic.cz> | 2018-10-08 11:16:26 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2018-10-08 11:16:26 +0200 |
commit | de5791ddb42d5b609b6b2d2e0c03f6524f12647c (patch) | |
tree | 0037c231a7f063501cf96dfa5f0cc621369c7a1b /x11-misc/myi3lock/files | |
parent | 2b0cc4d4d1532bfddc753b038e1e8a51e3dd02b8 (diff) | |
download | gentoo-personal-overlay-de5791ddb42d5b609b6b2d2e0c03f6524f12647c.tar.gz gentoo-personal-overlay-de5791ddb42d5b609b6b2d2e0c03f6524f12647c.tar.bz2 gentoo-personal-overlay-de5791ddb42d5b609b6b2d2e0c03f6524f12647c.zip |
Reimplement i3lock script handling
Now there is central package for my specific i3lock script and
pm trigger. Package background-lnxpcs is not solely for images and
background.
Diffstat (limited to 'x11-misc/myi3lock/files')
-rwxr-xr-x | x11-misc/myi3lock/files/myi3lock | 12 | ||||
-rwxr-xr-x | x11-misc/myi3lock/files/pm-utils-lock | 13 |
2 files changed, 25 insertions, 0 deletions
diff --git a/x11-misc/myi3lock/files/myi3lock b/x11-misc/myi3lock/files/myi3lock new file mode 100755 index 0000000..f466def --- /dev/null +++ b/x11-misc/myi3lock/files/myi3lock @@ -0,0 +1,12 @@ +#!/bin/sh +BACKS="/usr/share/backgrounds" + +# Set pidgin to offline +purple-remote 'setstatus?status=offline' +# Run lock in background and when unlocked switch pidgin back to online +nohup /bin/sh -ec " +i3lock -n -c 000000 -i $(shuf -n1 -e "$BACKS"/*) +purple-remote 'setstatus?status=available' +" >/dev/null 2>&1 & +# Power off screen +xset dpms force off 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 |