diff options
author | Karel Kočí <cynerd@email.cz> | 2022-01-10 15:12:56 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-01-10 15:12:56 +0100 |
commit | 831642301a60ae371d00d5f3cf9c8c66d3fd6f83 (patch) | |
tree | bf5304500ebabc773ed759096464639640757305 /x11-themes/background-lnxpcs/files/swaybaground | |
parent | 4fd6f99ace29bff27068a21ecf3e549fadd546a6 (diff) | |
download | gentoo-personal-overlay-831642301a60ae371d00d5f3cf9c8c66d3fd6f83.tar.gz gentoo-personal-overlay-831642301a60ae371d00d5f3cf9c8c66d3fd6f83.tar.bz2 gentoo-personal-overlay-831642301a60ae371d00d5f3cf9c8c66d3fd6f83.zip |
x11-themes/background-lnxpcs: add swaybackground
Diffstat (limited to 'x11-themes/background-lnxpcs/files/swaybaground')
-rwxr-xr-x | x11-themes/background-lnxpcs/files/swaybaground | 9 |
1 files changed, 9 insertions, 0 deletions
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 |