From 2c9c53481ea553208c2d40a59bee245b942bb273 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 1 Aug 2023 12:01:18 -0400 Subject: [PATCH] hyprland: Add background setter script --- home/hyprland.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/home/hyprland.nix b/home/hyprland.nix index d873780..53fbb68 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -16,6 +16,30 @@ in ''; }; + xdg.configFile."hypr/set-bg.fish" = { + executable = true; + text = /* fish */ '' + #!/usr/bin/env fish + + if [ (hyprctl getoption animations:enabled -j | jq -r ".int") = "1" ] + swww img \ + --transition-type $(random choice grow wave outer) \ + --transition-wave 80,40 \ + --transition-angle $(random choice 45 90 135 225 270 315) \ + --transition-pos $(random choice center top left right bottom top-left top-right bottom-left bottom-right) \ + --transition-step 200 \ + --transition-duration 1.5 \ + --transition-fps 240 \ + "$argv" + else + swww img \ + --transition-type simple \ + --transition-step 255 \ + "$argv" + end + ''; + }; + xdg.configFile."hypr/hyprland.conf".text = with config.lib.stylix.colors; /* bash */ '' env=XCURSOR_SIZE,24 env=BROWSER,librewolf