Kieran's opinionated (and probably slightly dumb) nix config
at hyprnix 2.7 kB view raw
1{ lib, ... }: 2{ 3 wayland.windowManager.hyprland = { 4 # <https://wiki.hyprland.org/Configuring/Variables/#general> 5 config.general = { 6 border_size = 2; 7 gaps_inside = 5; 8 gaps_outside = 10; 9 resize_on_border = true; 10 extend_border_grab_area = 10; 11 }; 12 13 # <https://wiki.hyprland.org/Configuring/Variables/#decoration> 14 config.decoration = { 15 rounding = 0; 16 shadow_range = 8; 17 shadow_render_power = 2; 18 blur = { 19 size = 3; # 8 20 passes = 2; # 1 21 ignore_opacity = true; # false 22 xray = true; # false 23 noise = 6.5e-2; # 0.0117 24 contrast = 0.75; # 0.8916 25 brightness = 0.8; # 0.8172 26 }; 27 }; 28 29 # <https://wiki.hyprland.org/Configuring/Variables/#input> 30 config.input = let 31 DISABLED = 0; 32 LOOSE = 2; 33 in { 34 follow_mouse = LOOSE; 35 float_switch_override_focus = DISABLED; 36 touchpad = { 37 natural_scroll = true; 38 }; 39 }; 40 41 # <https://wiki.hyprland.org/Configuring/Variables/#binds> 42 config.binds = let LONGEST_SHARED_SIDE = 1; 43 in { 44 pass_mouse_when_bound = false; 45 focus_preferred_method = LONGEST_SHARED_SIDE; 46 }; 47 48 config.gestures = { 49 workspace_swipe = { 50 enable = true; 51 invert = false; 52 min_speed_to_force = 20; 53 cancel_ratio = 0.65; 54 create_new = false; 55 forever = true; 56 }; 57 }; 58 59 # <https://wiki.hyprland.org/Configuring/Variables/#misc> 60 config.misc = let FULLSCREEN_ONLY = 2; 61 in { 62 disable_hyprland_logo = true; # false 63 disable_splash_rendering = true; # false 64 force_default_wallpaper = 0; # disable weeb stuff 65 variable_framerate = true; 66 variable_refresh = FULLSCREEN_ONLY; 67 disable_autoreload = true; # false # nix takes care of that 68 69 # works well with swayidle 70 key_press_enables_dpms = true; 71 mouse_move_enables_dpms = true; 72 }; 73 74 config.group = { 75 insert_after_current = true; 76 focus_removed_window = true; 77 78 # These features are not polished yet: 79 # <https://github.com/hyprwm/Hyprland/issues/2415> 80 # @MightyPlaza is working on this, but not doing it how we expect. 81 # <https://github.com/hyprwm/Hyprland/pull/3197> 82 groupbar = rec { 83 font_size = 9; 84 gradients = false; 85 render_titles = true; 86 scrolling = true; 87 }; 88 }; 89 90 # <https://wiki.hyprland.org/Configuring/Dwindle-Layout/> 91 config.dwindle = let ALWAYS_EAST = 2; 92 in { 93 force_split = ALWAYS_EAST; # 0 94 preserve_split = true; # false 95 # no_gaps_when_only = true; 96 }; 97 98 # <https://wiki.hyprland.org/Configuring/Animations/#curves> 99 }; 100}