diff --git a/modules/home/wayland/hyprland/default.nix b/modules/home/wayland/hyprland/default.nix index 7996aa9..75417f0 100644 --- a/modules/home/wayland/hyprland/default.nix +++ b/modules/home/wayland/hyprland/default.nix @@ -41,10 +41,20 @@ in { marleyos.programs.wofi.enable = true; home.pointerCursor.hyprcursor.enable = true; + home.packages = [ inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default ]; + services.hyprpaper = { + enable = true; + + settings = { + preload = "${./wallpaper.png}"; + wallpaper = ", ${./wallpaper.png}"; + }; + }; + wayland.windowManager.hyprland = { enable = true; @@ -127,6 +137,84 @@ in { (ws: "${toString ws}, monitor:${wsMons."${toString ws}"}") workspaces); + "$main" = lib.mkIf colors.isRosePine "$love"; + "$inactive" = lib.mkIf colors.isRosePine "$muted"; + + general = { + gaps_in = 5; + gaps_out = 20; + border_size = 2; + + "col.inactive_border" = "$inactive"; + "col.active_border" = + lib.mkIf colors.isRosePine "$rose $pine $love $iris 90deg"; + + resize_on_border = false; + + layout = "dwindle"; + }; + + decoration = { + rounding = 10; + + shadow = { + enabled = true; + range = 4; + render_power = 3; + color = "rgba(1a1a1aee)"; + }; + + blur = { + enabled = true; + size = 3; + passes = 1; + + vibrancy = 0.1696; + }; + }; + + animations = { + enabled = true; + + bezier = [ + "easeOutQuint,0.23,1,0.32,1" + "easeInOutCubic,0.65,0.05,0.36,1" + "linear,0,0,1,1" + "almostLinear,0.5,0.5,0.75,1.0" + "quick,0.15,0,0.1,1" + ]; + + animation = [ + "global, 1, 10, default" + "border, 1, 5.39, easeOutQuint" + "windows, 1, 4.79, easeOutQuint" + "windowsIn, 1, 4.1, easeOutQuint, popin 87%" + "windowsOut, 1, 1.49, linear, popin 87%" + "fadeIn, 1, 1.73, almostLinear" + "fadeOut, 1, 1.46, almostLinear" + "fade, 1, 3.03, quick" + "layers, 1, 3.81, easeOutQuint" + "layersIn, 1, 4, easeOutQuint, fade" + "layersOut, 1, 1.5, linear, fade" + "fadeLayersIn, 1, 1.79, almostLinear" + "fadeLayersOut, 1, 1.39, almostLinear" + "workspaces, 1, 1.94, almostLinear, fade" + "workspacesIn, 1, 1.21, almostLinear, fade" + "workspacesOut, 1, 1.94, almostLinear, fade" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + input = { + kb_layout = "us"; + numlock_by_default = true; + follow_mouse = 0; + }; + "$mod" = "SUPER"; bind = [ @@ -134,6 +222,7 @@ in { "$mod SHIFT, E, exit," "$mod SHIFT, SPACE, togglefloating" + "$mod, E, togglesplit" "$mod, RETURN, exec, $terminal" "$mod, R, exec, $launcher" @@ -164,15 +253,23 @@ in { "$mod SHIFT, 8, movetoworkspace, 8" "$mod SHIFT, 9, movetoworkspace, 9" "$mod SHIFT, 0, movetoworkspace, 10" + + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" ]; - # bindm = [ - # "$mod, mouse_down, workspace, e+1" - # "$mod, mouse_up, workspace, e-1" - # - # "$mod, mouse:272, movewindow" - # "$mod, mouse:273, resizewindow" - # ]; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + windowrulev2 = [ + # Ignore maximize requests from apps. + "suppressevent maximize, class:.*" + + # Fix some dragging issues with XWayland. + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" + ]; }; }; }; diff --git a/modules/home/wayland/hyprland/wallpaper.png b/modules/home/wayland/hyprland/wallpaper.png new file mode 100644 index 0000000..730d721 Binary files /dev/null and b/modules/home/wayland/hyprland/wallpaper.png differ