From f40c5b0c9cf5d0aca60c2523724d83d8ab60c5a8 Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Mon, 29 Jan 2024 17:06:24 -0600 Subject: [PATCH] Added ability to enable or disable animated borders in hyprland --- config/home/hyprland.nix | 9 ++++++--- flake.nix | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/home/hyprland.nix b/config/home/hyprland.nix index 4077691..487b9db 100644 --- a/config/home/hyprland.nix +++ b/config/home/hyprland.nix @@ -1,6 +1,6 @@ { pkgs, config, lib, browser, cpuType, gpuType, wallpaperDir, - inputs, ... }: + inputs, borderAnim, ... }: let theme = config.colorScheme.colors; @@ -24,7 +24,7 @@ in with lib; { gaps_in = 6 gaps_out = 8 border_size = 2 - col.active_border = rgba(${theme.base0C}ff) rgba(${theme.base0D}ff) 45deg + col.active_border = rgba(${theme.base0C}ff) rgba(${theme.base0D}ff) rgba(${theme.base0B}ff) rgba(${theme.base0E}ff) 45deg col.inactive_border = rgba(${theme.base00}cc) rgba(${theme.base01}cc) 45deg layout = dwindle resize_on_border = true @@ -81,7 +81,10 @@ in with lib; { animation = windowsOut, 1, 5, winOut, slide animation = windowsMove, 1, 5, wind, slide animation = border, 1, 1, liner - animation = borderangle, 1, 30, liner, loop + ${if borderAnim == "on" then '' + animation = borderangle, 1, 30, liner, loop + '' else '' + ''} animation = fade, 1, 10, default animation = workspaces, 1, 5, wind } diff --git a/flake.nix b/flake.nix index 22ea26d..dec7148 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ theTimezone = "America/Chicago"; theme = "gigavolt"; waybarStyle = "style2"; # can be style1-2 + borderAnim = "on"; # anything other than on disables anim borders in Hyprland browser = "firefox"; wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; wallpaperDir = "/home/${username}/Pictures/Wallpapers"; @@ -70,7 +71,7 @@ inherit browser; inherit wallpaperDir; inherit wallpaperGit; inherit flakeDir; inherit gpuType; inherit cpuType; - inherit waybarStyle; + inherit waybarStyle; inherit borderAnim; inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme; }; home-manager.useGlobalPkgs = true;