From 2d0a133dd9c187f4a457a8c017855b798ba0088a Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Sun, 29 Jun 2025 18:51:28 +0200 Subject: [PATCH] cava config, hyprland changes --- modules/common.nix | 1 + modules/hm/cava.nix | 22 ++++++++++++++++++++++ modules/hm/hyprland.nix | 36 +++++++++++++++++++++++++----------- modules/hm/waybar.nix | 9 +++++---- 4 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 modules/hm/cava.nix diff --git a/modules/common.nix b/modules/common.nix index 9d65d8c..1fe0cc6 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -43,6 +43,7 @@ ./hm/ssh.nix # SSH config ./hm/gitkraken.nix # GitKraken config ./hm/waybar.nix # Waybar config + ./hm/cava.nix # Audio visualizer config ]; }; diff --git a/modules/hm/cava.nix b/modules/hm/cava.nix new file mode 100644 index 0000000..fb513f4 --- /dev/null +++ b/modules/hm/cava.nix @@ -0,0 +1,22 @@ +let + colors = import ../gruvbox-theme.nix; +in { + programs.cava = { + enable = true; + settings = { + general = { + framerate = 60; + bar_spacing = 0; + }; + input.method = "pipewire"; + output.channels = "mono"; + color = { + gradient = 1; + gradient_count = 2; + gradient_color_1 = "'${colors.gruvbox.aqua}'"; + gradient_color_2 = "'${colors.gruvbox.orange}'"; + }; + smoothing.noise_reduction = 0.8; + }; + }; +} diff --git a/modules/hm/hyprland.nix b/modules/hm/hyprland.nix index 93dcb7d..0a05f27 100644 --- a/modules/hm/hyprland.nix +++ b/modules/hm/hyprland.nix @@ -14,6 +14,7 @@ in { misc = { disable_hyprland_logo = true; # disables the random Hyprland logo / anime girl background. :( disable_splash_rendering = true; + focus_on_activate = true; }; input = { @@ -42,6 +43,8 @@ in { workspace_swipe = true; workspace_swipe_forever = true; workspace_swipe_direction_lock = false; + workspace_swipe_distance = 200; + workspace_swipe_min_speed_to_force = 0; }; "$mod" = "SUPER"; @@ -61,26 +64,37 @@ in { decoration = { rounding = 10; - rounding_power = 4; + rounding_power = 3.5; blur = { enabled = true; - xray = true; - size = 4; - passes = 4; + new_optimizations = true; + ignore_opacity = true; + xray = false; + size = 3; + passes = 5; + popups = true; + }; + shadow = { + enabled = true; + range = 15; + render_power = 5; + color = "rgba(0,0,0,.5)"; }; }; animations = { enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + bezier = [ + "fluid, 0.15, 0.85, 0.25, 1" + "snappy, 0.3, 1, 0.4, 1" + ]; animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default, slidevert" + "windows, 1, 3, fluid, popin 5%" + "windowsOut, 1, 2.5, snappy" + "fade, 1, 4, snappy" + "workspaces, 1, 1.7, snappy, slidevert" + "layers, 1, 2, snappy, popin 70%" ]; }; diff --git a/modules/hm/waybar.nix b/modules/hm/waybar.nix index 6f46eee..366364e 100644 --- a/modules/hm/waybar.nix +++ b/modules/hm/waybar.nix @@ -19,7 +19,7 @@ "all-outputs" = true; "separate-outputs" = true; }; - load = {format = " {load1}";}; + load = {format = " {load1}";}; backlight = { format = "{icon} {percent}%"; "format-icons" = ["" "" "" "" "" "" "" "" ""]; @@ -32,18 +32,19 @@ cava = { framerate = 60; autosens = 1; - bars = 8; + sensitivity = 2; + bars = 12; "lower_cutoff_freq" = 50; "higher_cutoff_freq" = 10000; method = "pipewire"; source = "auto"; stereo = false; "bar_delimiter" = 0; - "noise_reduction" = 0.77; + "noise_reduction" = 0.7; "input_delay" = 2; "hide_on_silence" = true; "sleep_timer" = 3; - "format-icons" = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; + "format-icons" = [" " "▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; actions = {"on-click-right" = "mode";}; }; "idle_inhibitor" = {