diff options
author | Karel Kočí <cynerd@email.cz> | 2022-01-16 19:11:59 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-01-16 19:11:59 +0100 |
commit | 6f34477f7b9914cab366b988346d672a1b38e2a5 (patch) | |
tree | 784ef15e6a36dc55039d0b6097d955ec05269f08 /x11-themes/background-lnxpcs/files/swaybackground | |
parent | 31790ea612d0d1650c1f04e8f4d9a579e38aff86 (diff) | |
download | gentoo-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
Diffstat (limited to 'x11-themes/background-lnxpcs/files/swaybackground')
-rwxr-xr-x | x11-themes/background-lnxpcs/files/swaybackground | 6 |
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 |