From 831642301a60ae371d00d5f3cf9c8c66d3fd6f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 10 Jan 2022 15:12:56 +0100 Subject: x11-themes/background-lnxpcs: add swaybackground --- x11-themes/background-lnxpcs/Manifest | 2 +- .../background-lnxpcs-0.3.3-r1.ebuild | 40 --------------------- .../background-lnxpcs-0.4.0-r1.ebuild | 41 ++++++++++++++++++++++ x11-themes/background-lnxpcs/files/swaybaground | 9 +++++ 4 files changed, 51 insertions(+), 41 deletions(-) delete mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.3.3-r1.ebuild create mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild create mode 100755 x11-themes/background-lnxpcs/files/swaybaground diff --git a/x11-themes/background-lnxpcs/Manifest b/x11-themes/background-lnxpcs/Manifest index d79b65b..22dd9f6 100644 --- a/x11-themes/background-lnxpcs/Manifest +++ b/x11-themes/background-lnxpcs/Manifest @@ -1 +1 @@ -DIST background-lnxpcs-0.3.3-fd4487e1989fc040490fa437a2651d37afcde637.tar.gz 286301233 BLAKE2B 43f2eb4d5a8f860f14340fedd2a205e53351cbd5faf394ec83294c2c847b8f86da314302869dee7aaf8e0edc95f502d156200356aa8642f85b50d360102cc208 SHA512 1800eb07f84d839463f455c820225f8aeda4122c98e6edc7eaee2019c73aaf8e93fb4a45ac6419a5c95fd65c92fcb55d9e9a6db741af0c1a36b7c42b1ea9923c +DIST background-lnxpcs-fd4487e1989fc040490fa437a2651d37afcde637.tar.gz 286301233 BLAKE2B 43f2eb4d5a8f860f14340fedd2a205e53351cbd5faf394ec83294c2c847b8f86da314302869dee7aaf8e0edc95f502d156200356aa8642f85b50d360102cc208 SHA512 1800eb07f84d839463f455c820225f8aeda4122c98e6edc7eaee2019c73aaf8e93fb4a45ac6419a5c95fd65c92fcb55d9e9a6db741af0c1a36b7c42b1ea9923c diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.3.3-r1.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.3.3-r1.ebuild deleted file mode 100644 index e2e02c6..0000000 --- a/x11-themes/background-lnxpcs/background-lnxpcs-0.3.3-r1.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -EAPI=7 - -DESCRIPTION="Background pictures from lnxpcs and relevant scripts" -HOMEPAGE="https://mega.nz/#F!mXgW3apI!Tdikb01SoOaTmNLiaTRhMg" - -HASH="fd4487e1989fc040490fa437a2651d37afcde637" -SRC_URI="https://github.com/Cynerd/lnxpcs/archive/${HASH}/lnxpcs-${HASH}.tar.gz -> ${P}-${HASH}.tar.gz" -S="${WORKDIR}/lnxpcs-${HASH}" - -KEYWORDS="amd64" -LICENSE="GPL-3.0+" -SLOT="0" -IUSE="1440p 1600p" - -RDEPEND="media-gfx/feh[xinerama]" -BDEPEND="media-gfx/imagemagick[png]" - -WALLPAPERS="bash cron gcc gnu gnu-linux iptables kernel kill python root su sudo vim" - -src_compile() { - local resolution="1920 1080" - use 1440p && resolution="2560 1440" - use 1600p && resolution="2560 1600" - - for img in $WALLPAPERS; do - ./makemywall $resolution "cards/black/$img-card-black.png" - done -} - -src_install() { - local resolution="1920x1080" - use 1440p && resolution="2560x1440" - use 1600p && resolution="2560x1600" - - insinto "/usr/share/backgrounds" - for img in $WALLPAPERS; do - doins "$img-card-black-$resolution.png" - done - dobin "${FILESDIR}/i3background" -} diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild new file mode 100644 index 0000000..bf7267a --- /dev/null +++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild @@ -0,0 +1,41 @@ +EAPI=7 + +DESCRIPTION="Background pictures from lnxpcs and relevant scripts" +HOMEPAGE="https://mega.nz/#F!mXgW3apI!Tdikb01SoOaTmNLiaTRhMg" + +HASH="fd4487e1989fc040490fa437a2651d37afcde637" +SRC_URI="https://github.com/Cynerd/lnxpcs/archive/${HASH}/lnxpcs-${HASH}.tar.gz -> ${PN}-${HASH}.tar.gz" +S="${WORKDIR}/lnxpcs-${HASH}" + +KEYWORDS="amd64" +LICENSE="GPL-3.0+" +SLOT="0" +IUSE="1440p 1600p" + +RDEPEND="media-gfx/feh[xinerama]" +BDEPEND="media-gfx/imagemagick[png]" + +WALLPAPERS="bash cron gcc gnu gnu-linux iptables kernel kill python root su sudo vim" + +src_compile() { + local resolution="1920 1080" + use 1440p && resolution="2560 1440" + use 1600p && resolution="2560 1600" + + for img in $WALLPAPERS; do + ./makemywall $resolution "cards/black/$img-card-black.png" + done +} + +src_install() { + local resolution="1920x1080" + use 1440p && resolution="2560x1440" + use 1600p && resolution="2560x1600" + + insinto "/usr/share/backgrounds" + for img in $WALLPAPERS; do + newins "$img-card-black-$resolution.png" "$img.png" + done + dobin "${FILESDIR}/i3background" + dobin "${FILESDIR}/swaybackground" +} diff --git a/x11-themes/background-lnxpcs/files/swaybaground b/x11-themes/background-lnxpcs/files/swaybaground new file mode 100755 index 0000000..0bc42be --- /dev/null +++ b/x11-themes/background-lnxpcs/files/swaybaground @@ -0,0 +1,9 @@ +#!/bin/sh +BACKS="/usr/share/backgrounds" + +if [ -n "$WAYLAND_DISPLAY" ]; then + swaymsg output '*' background "$(find "$BACKS" -type f | shuf -n 1)" fill +else + find "/run/user/$(id -u)/" -name "sway-ipc*" \ + -exec swaymsg -s {} "exec $0" + +fi -- cgit v1.2.3