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 --- x11-themes/background-lnxpcs/files/swaybackground | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'x11-themes/background-lnxpcs/files/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