From f4b0c41289aeea52a6b129f53a8fabb67c5cb3c1 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sun, 19 Nov 2023 06:37:21 -0500 Subject: [PATCH] hyprland(swww): Randomize background on all monitors --- home/hyprland.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/home/hyprland.nix b/home/hyprland.nix index 707e730..eeac286 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -32,12 +32,14 @@ in --transition-step 200 \ --transition-duration 1.5 \ --transition-fps 240 \ - "$argv" + --outputs "$argv[1]" \ + "$argv[2]" else swww img \ --transition-type simple \ --transition-step 255 \ - "$argv" + --outputs "$argv[1]" \ + "$argv[2]" end ''; }; @@ -48,7 +50,10 @@ in #!/usr/bin/env fish cd ~/.config/hypr - ./set-bg.fish "$(random choice $(fd . /run/current-system/sw/share/backgrounds --follow -e jpg -e png))" + + for monitor in (hyprctl monitors -j | jq -r '.[].name') + ./set.fish "$monitor" "$(random choice $(fd . /run/current-system/sw/share/backgrounds --follow -e jpg -e png))" + end ''; };