From 76b8c5a0cf595e4c6ca133073e026f2e1d797b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 10 Jan 2022 15:33:08 +0100 Subject: x11-themes/background-lnxpcs: fix invalid file name --- x11-themes/background-lnxpcs/files/swaybackground | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 x11-themes/background-lnxpcs/files/swaybackground (limited to 'x11-themes/background-lnxpcs/files/swaybackground') diff --git a/x11-themes/background-lnxpcs/files/swaybackground b/x11-themes/background-lnxpcs/files/swaybackground new file mode 100755 index 0000000..0bc42be --- /dev/null +++ b/x11-themes/background-lnxpcs/files/swaybackground @@ -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 -- cgit v1.2.3