summaryrefslogtreecommitdiff
path: root/x11-themes/background-lnxpcs/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11-themes/background-lnxpcs/files')
-rwxr-xr-xx11-themes/background-lnxpcs/files/swaybackground6
1 files changed, 3 insertions, 3 deletions
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