From b0df64a038152e78071453475f5022b6847f81fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 10 Aug 2018 10:45:18 +0200 Subject: x11-themes/background-lnxpcs: make backgrounds full hd --- .../background-lnxpcs/background-lnxpcs-0.2.ebuild | 33 -------------------- .../background-lnxpcs/background-lnxpcs-0.3.ebuild | 35 ++++++++++++++++++++++ x11-themes/background-lnxpcs/files/i3background | 21 ++++++------- 3 files changed, 44 insertions(+), 45 deletions(-) delete mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild create mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild (limited to 'x11-themes/background-lnxpcs') diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild deleted file mode 100644 index f30d5b1..0000000 --- a/x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -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="bash cron gcc gnu gnu-linux iptables kernel kill python root su sudo vim" - -src_compile() { - # Nothing to compile - true -} - -src_install() { - insinto "/usr/share/backgrounds" - for IMG in $WALLPAPERS; do - doins "cards/black/$IMG-card-black.png" - done - dobin "${FILESDIR}/i3background" - dobin "${FILESDIR}/i3lock-lnxpcs" -} diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild new file mode 100644 index 0000000..0625be0 --- /dev/null +++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild @@ -0,0 +1,35 @@ +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="" + +DEPENDS="media-gfx/imagemagick[png]" +RDEPEND=" + x11-misc/i3lock + media-gfx/feh[xinerama]" + +WALLPAPERS="bash cron gcc gnu gnu-linux iptables kernel kill python root su sudo vim" + +src_compile() { + for IMG in $WALLPAPERS; do + ./makemywall 1920 1080 "cards/black/$IMG-card-black.png" + done +} + +src_install() { + insinto "/usr/share/backgrounds" + for IMG in $WALLPAPERS; do + doins "$IMG-card-black-1920x1080.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 index f55f8e7..cf51581 100755 --- a/x11-themes/background-lnxpcs/files/i3background +++ b/x11-themes/background-lnxpcs/files/i3background @@ -1,20 +1,17 @@ #!/bin/sh BACKS="/usr/share/backgrounds" -# Set background + if [ -n "$DISPLAY" ]; then - # Only current one feh --randomize --no-fehbg --bg-fill "$BACKS" + if ! crontab -l 2>/dev/null | grep -q i3background; then + TCRN="$(mktemp)" + crontab -l 2>/dev/null > "$TCRN" + echo "* * * * * i3background" >> "$TCRN" + crontab "$TCRN" + rm "$TCRN" + fi else - # All instances for socket in $(find /run/user/$(id -u)/i3 /tmp/i3-$(id -un).* -name ipc-socket\* 2>/dev/null); do - i3-msg -s $socket "exec feh --randomize --no-fehbg --bg-fill '$BACKS'" + i3-msg -s $socket "exec $0" done fi -# Set cron -if ! crontab -l 2>/dev/null | grep -q i3background; then - TCRN="$(mktemp)" - crontab -l 2>/dev/null > "$TCRN" - echo "* * * * * i3background" >> "$TCRN" - crontab "$TCRN" - rm "$TCRN" -fi -- cgit v1.2.3