diff --git a/modules/biscuit/gui.nix b/modules/biscuit/xserver.nix similarity index 100% rename from modules/biscuit/gui.nix rename to modules/biscuit/xserver.nix diff --git a/modules/system.nix b/modules/system.nix index 29e8442..76ba990 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -8,6 +8,7 @@ ../system/print.nix ../system/term.nix ../system/development.nix + ../system/wayland.nix # ../system/proxy.nix # ../system/recovery.nix # only supports non-flake conf ../system/sound.nix diff --git a/modules/xserver.nix b/modules/xserver.nix new file mode 100644 index 0000000..7c99810 --- /dev/null +++ b/modules/xserver.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ../system/wayland.nix + ]; +} diff --git a/nixos/biscuit/configuration.nix b/nixos/biscuit/configuration.nix index d0d58ea..b43d617 100644 --- a/nixos/biscuit/configuration.nix +++ b/nixos/biscuit/configuration.nix @@ -8,6 +8,7 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ../../modules/system.nix + ../../modules/xserver.nix ]; environment.systemPackages = with pkgs; [ diff --git a/pkgs/hyprland/biscuit.nix b/pkgs/hyprland/biscuit.nix index eaf56a4..e541c68 100644 --- a/pkgs/hyprland/biscuit.nix +++ b/pkgs/hyprland/biscuit.nix @@ -1,55 +1,177 @@ {...}: { - wayland.windowManager.hyprland.enable = true; - wayland.windowManager.hyprland.settings = { + wayland.windowManager.hyprland = { + enable = true; + settings = { + "$mod" = "SUPER"; + "$term" = "kitty --single-instance"; + "$browser" = "firefox"; + "$bar" = "ags run"; - "$mod" = "SUPER"; - "$term" = "kitty --single-instance"; - "$browser" = "firefox"; - "$bar" = "ags run"; + monitor = [",highres@highrr,auto,auto"]; - bind = [ - "$mod, Return, exec, $terminal" - "$mod, Q, killactive" - "$mod, W, exec firefox" - ]; - - general = { - gaps_in = 2; - gaps_out = 5; - border_size = 2; - col.active_border = "rgba(33ccffee) rgba(00ff99ee) 45deg"; - col.inactive_border = "rgba(595959aa)"; - resize_on_border = false; - allow_tearing = false; - layout = "dwindle"; - }; - decoration = { - rounding = 0; - rounding_power = 2; - active_opacity = 1.0; - inactive_opacity = 1.0; - shadow = { + exec = [ + "$term" + ]; + + general = { + gaps_in = 2; + gaps_out = 5; + border_size = 2; + col.active_border = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + col.inactive_border = "rgba(595959aa)"; + resize_on_border = false; + allow_tearing = false; + layout = "dwindle"; + }; + + decoration = { + rounding = 0; + rounding_power = 2; + active_opacity = 1.0; + inactive_opacity = 1.0; + + shadow = { enabled = true; range = 4; render_power = 3; color = "rgba(1a1a1aee)"; - }; - blur = { + }; + + blur = { enabled = true; size = 3; passes = 1; vibrancy = 0.1696; + }; }; - }; - animations = { - enabled = true; - # Animation curves - bezier = [ - "linear, 0, 0, 1, 1" + + animations = { + enabled = true; + bezier = [ + "linear, 0, 0, 1, 1" + "md3_standard, 0.2, 0, 0, 1" + "md3_decel, 0.05, 0.7, 0.1, 1" + "md3_accel, 0.3, 0, 0.8, 0.15" + "overshot, 0.05, 0.9, 0.1, 1.1" + "crazyshot, 0.1, 1.5, 0.76, 0.92" + "hyprnostretch, 0.05, 0.9, 0.1, 1.0" + "menu_decel, 0.1, 1, 0, 1" + "menu_accel, 0.38, 0.04, 1, 0.07" + "easeInOutCirc, 0.85, 0, 0.15, 1" + "easeOutCirc, 0, 0.55, 0.45, 1" + "easeOutExpo, 0.16, 1, 0.3, 1" + "softAcDecel, 0.26, 0.26, 0.15, 1" + "md2, 0.4, 0, 0.2, 1" + ]; + + animation = [ + "windows, 1, 3, md3_decel, popin 60%" + "windowsIn, 1, 3, md3_decel, popin 60%" + "windowsOut, 1, 3, md3_accel, popin 60%" + "border, 1, 10, default" + "fade, 1, 3, md3_decel" + "layersIn, 1, 3, menu_decel, slide" + "layersOut, 1, 1.6, menu_accel" + "fadeLayersIn, 1, 2, menu_decel" + "fadeLayersOut, 1, 0.5, menu_accel" + "workspaces, 1, 7, menu_decel, slide" + "specialWorkspace, 1, 3, md3_decel, slidevert" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master = { + new_status = "master"; + }; + + misc = { + force_default_wallpaper = -1; + disable_hyprland_logo = true; + }; + + input = { + kb_layout = "us"; + follow_mouse = 1; + sensitivity = 0; + + touchpad = { + natural_scroll = false; + }; + + numlock_by_default = true; + }; + + gestures = { + workspace_swipe = false; + }; + + device = [ + { + name = "epic-mouse-v1"; + sensitivity = -0.5; + } + ]; + + bind = + [ + "$mod, Return, exec, $terminal" + "$mod, Q, killactive," + "$mod, M, exit," + "$mod, E, exec, $fileManager" + "$mod, V, togglefloating," + "$mod, R, exec, $menu" + "$mod, P, pseudo," + "$mod, B, togglesplit," + "$mod, W, exec, $browser" + + "$mod, H, movefocus, l" + "$mod, L, movefocus, r" + "$mod, K, movefocus, u" + "$mod, J, movefocus, d" + + "$mod, S, togglespecialworkspace, magic" + "$mod SHIFT, S, movetoworkspace, special:magic" + + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + ] + ++ ( + # workspaces + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "$mod, ${toString ws}, workspace, ${toString ws}" + "$mod SHIFT, ${toString ws}, movetoworkspace, ${toString ws}" + ] + ) + 10) + ); + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + bindel = [ + ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" + ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ",XF86MonBrightnessUp, exec, brightnessctl s 10%+" + ",XF86MonBrightnessDown, exec, brightnessctl s 10%-" + ]; + + bindl = [ + ",XF86AudioNext, exec, playerctl next" + ",XF86AudioPause, exec, playerctl play-pause" + ",XF86AudioPlay, exec, playerctl play-pause" + ",XF86AudioPrev, exec, playerctl previous" ]; - animation = []; }; - - }; } diff --git a/system/wayland.nix b/system/wayland.nix index 9f13651..dce1470 100644 --- a/system/wayland.nix +++ b/system/wayland.nix @@ -1,3 +1,5 @@ {...}: { - + hardware = { + graphics.enable = true; + }; }