summaryrefslogtreecommitdiff
path: root/x11-themes
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-01-10 15:12:56 +0100
committerKarel Kočí <cynerd@email.cz>2022-01-10 15:12:56 +0100
commit831642301a60ae371d00d5f3cf9c8c66d3fd6f83 (patch)
treebf5304500ebabc773ed759096464639640757305 /x11-themes
parent4fd6f99ace29bff27068a21ecf3e549fadd546a6 (diff)
downloadgentoo-personal-overlay-831642301a60ae371d00d5f3cf9c8c66d3fd6f83.tar.gz
gentoo-personal-overlay-831642301a60ae371d00d5f3cf9c8c66d3fd6f83.tar.bz2
gentoo-personal-overlay-831642301a60ae371d00d5f3cf9c8c66d3fd6f83.zip
x11-themes/background-lnxpcs: add swaybackground
Diffstat (limited to 'x11-themes')
-rw-r--r--x11-themes/background-lnxpcs/Manifest2
-rw-r--r--x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild (renamed from x11-themes/background-lnxpcs/background-lnxpcs-0.3.3-r1.ebuild)5
-rwxr-xr-xx11-themes/background-lnxpcs/files/swaybaground9
3 files changed, 13 insertions, 3 deletions
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.4.0-r1.ebuild
index e2e02c6..bf7267a 100644
--- a/x11-themes/background-lnxpcs/background-lnxpcs-0.3.3-r1.ebuild
+++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild
@@ -4,7 +4,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"
+SRC_URI="https://github.com/Cynerd/lnxpcs/archive/${HASH}/lnxpcs-${HASH}.tar.gz -> ${PN}-${HASH}.tar.gz"
S="${WORKDIR}/lnxpcs-${HASH}"
KEYWORDS="amd64"
@@ -34,7 +34,8 @@ src_install() {
insinto "/usr/share/backgrounds"
for img in $WALLPAPERS; do
- doins "$img-card-black-$resolution.png"
+ 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