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