summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-01-16 19:11:59 +0100
committerKarel Kočí <cynerd@email.cz>2022-01-16 19:11:59 +0100
commit6f34477f7b9914cab366b988346d672a1b38e2a5 (patch)
tree784ef15e6a36dc55039d0b6097d955ec05269f08
parent31790ea612d0d1650c1f04e8f4d9a579e38aff86 (diff)
downloadgentoo-personal-overlay-6f34477f7b9914cab366b988346d672a1b38e2a5.tar.gz
gentoo-personal-overlay-6f34477f7b9914cab366b988346d672a1b38e2a5.tar.bz2
gentoo-personal-overlay-6f34477f7b9914cab366b988346d672a1b38e2a5.zip
x11-themes/background-lnxpcs: fix when swaybackground run outside sway
-rw-r--r--x11-themes/background-lnxpcs/background-lnxpcs-0.4.1-r1.ebuild (renamed from x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild)0
-rwxr-xr-xx11-themes/background-lnxpcs/files/swaybackground6
2 files changed, 3 insertions, 3 deletions
diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.1-r1.ebuild
index bf7267a..bf7267a 100644
--- a/x11-themes/background-lnxpcs/background-lnxpcs-0.4.0-r1.ebuild
+++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.4.1-r1.ebuild
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