From cc567a7a1f92e501c34ad8761b923fc7bc8ef4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 9 Aug 2018 12:11:49 +0200 Subject: Add x11-themes/background package --- x11-themes/background-lnxpcs/Manifest | 1 + .../background-lnxpcs/background-lnxpcs-0.1.ebuild | 33 ++++++++++++++++++++++ x11-themes/background-lnxpcs/files/i3background | 21 ++++++++++++++ x11-themes/background-lnxpcs/files/i3lock-lnxpcs | 5 ++++ 4 files changed, 60 insertions(+) create mode 100644 x11-themes/background-lnxpcs/Manifest create mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.1.ebuild create mode 100755 x11-themes/background-lnxpcs/files/i3background create mode 100755 x11-themes/background-lnxpcs/files/i3lock-lnxpcs (limited to 'x11-themes') diff --git a/x11-themes/background-lnxpcs/Manifest b/x11-themes/background-lnxpcs/Manifest new file mode 100644 index 0000000..460d98c --- /dev/null +++ b/x11-themes/background-lnxpcs/Manifest @@ -0,0 +1 @@ +DIST background-lnxpcs.tar.gz 247579334 BLAKE2B de6fccc5bb9d91fd4ed63eca4dbc0a8ccd0c15fdcf5bb0d0d97b4cc76522ac852d2887cb4f7f40fc133f6b45d7933be9fcd3e43d6628d22f8eb39780e42a90a1 SHA512 93eff4b134c5a38995e2a322614e6b6d5fa5daf42d72f8dc64b54799d28dd872f7f94ea8ad41a0120a1707006761782d5652d32c9e5cddd2d22bd9f50b5ab8e8 diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.1.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.1.ebuild new file mode 100644 index 0000000..405e187 --- /dev/null +++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.1.ebuild @@ -0,0 +1,33 @@ +EAPI=6 + +DESCRIPTION="Background pictures from lnxpcs and relevant scripts" +HOMEPAGE="https://gitlab.com/jstpcs/lnxpcs" + +HASH="99cf0bdafe6d9c6e0554c422eddc3f7b7adf25c8" +SRC_URI="https://gitlab.com/jstpcs/lnxpcs/-/archive/master/lnxpcs-${HASH}.tar.gz -> ${PN}.tar.gz" +S="${WORKDIR}/lnxpcs-master-${HASH}" + +KEYWORDS="amd64" +LICENSE="GPL-3.0+" +SLOT="0" +IUSE="" + +RDEPEND=" + x11-misc/i3lock + media-gfx/feh[xinerama]" + +WALLPAPERS="cron gcc gnu iptables kernel python root sudo vim" + +src_compile() { + # Nothing to compile + true +} + +src_install() { + insinto "/usr/share/backgrounds" + for IMG in $WALLPAPERS; do + doins "walls/solarized-dark/solarized-wallpaper-$IMG.png" + done + dobin "${FILESDIR}/i3background" + dobin "${FILESDIR}/i3lock-lnxpcs" +} diff --git a/x11-themes/background-lnxpcs/files/i3background b/x11-themes/background-lnxpcs/files/i3background new file mode 100755 index 0000000..faec41e --- /dev/null +++ b/x11-themes/background-lnxpcs/files/i3background @@ -0,0 +1,21 @@ +#!/bin/sh +BACKS="/usr/share/backgrounds" +BACKS="/home/cynerd/src/lnxpcs/walls/solarized-dark" +# Set background +if [ -n "$DISPLAY" ]; then + # Only current one + feh --randomize --no-fehbg --bg-center "$BACKS" +else + # All instances + for socket in `find /tmp/i3-* -name ipc-socket\*`; do + i3-msg -s $socket "exec feh --randomize --no-fehbg --bg-center '$BACKS'" + done +fi +# Set cron +if ! crontab -l | grep -q i3background; then + TCRN="$(mktemp)" + crontab -l > "$TCRN" + echo "* * * * * i3background" >> "$TCRN" + crontab "$TCRN" + rm "$TCRN" +fi diff --git a/x11-themes/background-lnxpcs/files/i3lock-lnxpcs b/x11-themes/background-lnxpcs/files/i3lock-lnxpcs new file mode 100755 index 0000000..11398bd --- /dev/null +++ b/x11-themes/background-lnxpcs/files/i3lock-lnxpcs @@ -0,0 +1,5 @@ +#!/bin/sh +BACKS="/usr/share/backgrounds" +i3lock -c 000000 -i $(shuf -n1 -e "$BACKS"/*) -t -f +sleep 1 +xset dpms force off -- cgit v1.2.3