From 6f34477f7b9914cab366b988346d672a1b38e2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 16 Jan 2022 19:11:59 +0100 Subject: x11-themes/background-lnxpcs: fix when swaybackground run outside sway --- .../background-lnxpcs-0.4.0-r1.ebuild | 41 ---------------------- .../background-lnxpcs-0.4.1-r1.ebuild | 41 ++++++++++++++++++++++ x11-themes/background-lnxpcs/files/swaybackground | 6 ++-- 3 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild create mode 100644 x11-themes/background-lnxpcs/background-lnxpcs-0.4.1-r1.ebuild (limited to 'x11-themes') 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 deleted file mode 100644 index bf7267a..0000000 --- a/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild +++ /dev/null @@ -1,41 +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 -> ${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/background-lnxpcs-0.4.1-r1.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.1-r1.ebuild new file mode 100644 index 0000000..bf7267a --- /dev/null +++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.1-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/swaybackground b/x11-themes/background-lnxpcs/files/swaybackground index 0bc42be..7f9ecea 100755 --- a/x11-themes/background-lnxpcs/files/swaybackground +++ b/x11-themes/background-lnxpcs/files/swaybackground @@ -1,9 +1,9 @@ #!/bin/sh -BACKS="/usr/share/backgrounds" +background="$(find /usr/share/backgrounds -type f | shuf -n 1)" if [ -n "$WAYLAND_DISPLAY" ]; then - swaymsg output '*' background "$(find "$BACKS" -type f | shuf -n 1)" fill + swaymsg output '*' background "$background" fill else find "/run/user/$(id -u)/" -name "sway-ipc*" \ - -exec swaymsg -s {} "exec $0" + + -exec swaymsg -s "{}" output '*' background "$background" fill ";" fi -- cgit v1.2.3