nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

hyprland.nix (5890B)


      1 { ... }:
      2 
      3 {
      4   wayland.windowManager.hyprland = {
      5     enable = true;
      6     settings = {
      7 
      8       ecosystem = {
      9         "no_update_news" = true;
     10         "no_donation_nag" = true;
     11       };
     12 
     13       monitor = ",preferred,auto,auto";
     14       env = [
     15         "XCURSOR_SIZE,24"
     16         "HYPRCURSOR_SIZE,24"
     17       ];
     18 
     19       general = {
     20         gaps_in = 5;
     21         gaps_out = 20;
     22         border_size = 2;
     23         "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
     24         "col.inactive_border" = "rgba(595959aa)";
     25         resize_on_border = false;
     26         allow_tearing = false;
     27         layout = "dwindle";
     28       };
     29 
     30       cursor = {
     31         inactive_timeout = 3;
     32       };
     33 
     34       decoration = {
     35         rounding = 5;
     36         active_opacity = 1.0;
     37         inactive_opacity = 1.0;
     38         shadow = {
     39           enabled = true;
     40           range = 4;
     41           render_power = 3;
     42           color = "rgba(1a1a1aee)";
     43         };
     44         blur = {
     45           enabled = true;
     46           size = 3;
     47           passes = 1;
     48           vibrancy = 0.1696;
     49         };
     50       };
     51 
     52       animations = {
     53         enabled = true;
     54         bezier = [
     55           "easeOutQuint,0.23,1,0.32,1"
     56           "easeInOutCubic,0.65,0.05,0.36,1"
     57           "linear,0,0,1,1"
     58           "almostLinear,0.5,0.5,0.75,1.0"
     59           "quick,0.15,0,0.1,1"
     60           ];
     61           animation = [
     62           "global, 1, 10, default"
     63           "border, 1, 5.39, easeOutQuint"
     64           "windows, 1, 4.79, easeOutQuint"
     65           "windowsIn, 1, 4.1, easeOutQuint, popin 87%"
     66           "windowsOut, 1, 1.49, linear, popin 87%"
     67           "fadeIn, 1, 1.73, almostLinear"
     68           "fadeOut, 1, 1.46, almostLinear"
     69           "fade, 1, 3.03, quick"
     70           "layers, 1, 3.81, easeOutQuint"
     71           "layersIn, 1, 4, easeOutQuint, fade"
     72           "layersOut, 1, 1.5, linear, fade"
     73           "fadeLayersIn, 1, 1.79, almostLinear"
     74           "fadeLayersOut, 1, 1.39, almostLinear"
     75           "workspaces, 1, 1.94, almostLinear, fade"
     76           "workspacesIn, 1, 1.21, almostLinear, fade"
     77           "workspacesOut, 1, 1.94, almostLinear, fade"
     78           ];
     79           };
     80 
     81           dwindle = {
     82           pseudotile = true;
     83           preserve_split = true;
     84           workspace = [
     85           "w[tv1], gapsout:0, gapsin:0"
     86           "f[1], gapsout:0, gapsin:0"
     87           ];
     88           windowrulev2 = [
     89           "bordersize 0, floating:0, onworkspace:w[tv1]"
     90           "rounding 0, floating:0, onworkspace:w[tv1]"
     91           "bordersize 0, floating:0, onworkspace:f[1]"
     92           "rounding 0, floating:0, onworkspace:f[1]"
     93           ];
     94           };
     95 
     96           master = {
     97           new_status = "master";
     98         };
     99 
    100         misc = {
    101           force_default_wallpaper = 0;
    102           disable_hyprland_logo = true;
    103         };
    104 
    105         input = {
    106           kb_layout = "gb";
    107           kb_options = "caps:backspace";
    108           follow_mouse = 1;
    109           sensitivity = 0;
    110           touchpad = {
    111             natural_scroll = false;
    112           };
    113         };
    114 
    115         bind = [
    116           "SUPER, R, exec, tofi-run | xargs hyprctl dispatch exec --"
    117           "SUPER, W, exec, firefox"
    118           "SUPER, T, exec, alacritty"
    119           "SUPER_SHIFT, W, exec, firefox -private-window"
    120           "ALT, Tab, cyclenext"
    121           "ALT SHIFT, Tab, cyclenext, prev"
    122           "SUPER, RETURN, exec, alacritty"
    123           "SUPER_SHIFT, Q, killactive,"
    124           "SUPER, X, exit,"
    125           "SUPER, E, exec, alacritty -e lf"
    126           "SUPER, Space, togglefloating,"
    127           "SUPER, F, fullscreen,"
    128           "SUPER, P, pseudo,"
    129           "SUPER, J, togglesplit,"
    130           "SUPER, left, movefocus, l"
    131           "SUPER, right, movefocus, r"
    132           "SUPER, up, movefocus, u"
    133           "SUPER, down, movefocus, d"
    134           "SUPER, 1, workspace, 1"
    135           "SUPER, 2, workspace, 2"
    136           "SUPER, 3, workspace, 3"
    137           "SUPER, 4, workspace, 4"
    138           "SUPER, 5, workspace, 5"
    139           "SUPER, 6, workspace, 6"
    140           "SUPER, 7, workspace, 7"
    141           "SUPER, 8, workspace, 8"
    142           "SUPER, 9, workspace, 9"
    143           "SUPER, 0, workspace, 10"
    144           "SUPER SHIFT, 1, movetoworkspace, 1"
    145           "SUPER SHIFT, 2, movetoworkspace, 2"
    146           "SUPER SHIFT, 3, movetoworkspace, 3"
    147           "SUPER SHIFT, 4, movetoworkspace, 4"
    148           "SUPER SHIFT, 5, movetoworkspace, 5"
    149           "SUPER SHIFT, 6, movetoworkspace, 6"
    150           "SUPER SHIFT, 7, movetoworkspace, 7"
    151           "SUPER SHIFT, 8, movetoworkspace, 8"
    152           "SUPER SHIFT, 9, movetoworkspace, 9"
    153           "SUPER SHIFT, 0, movetoworkspace, 10"
    154           "SUPER, mouse_down, workspace, e+1"
    155           "SUPER, mouse_up, workspace, e-1"
    156         ];
    157 
    158         bindm = [
    159           "ALT, mouse:272, movewindow"
    160           "ALT, mouse:273, resizewindow"
    161         ];
    162 
    163         bindel = [
    164           ",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
    165           ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
    166           ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
    167           ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
    168           ",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
    169           ",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
    170         ];
    171 
    172         bindl = [
    173           ", XF86AudioNext, exec, playerctl next"
    174           ", XF86AudioPause, exec, playerctl play-pause"
    175           ", XF86AudioPlay, exec, playerctl play-pause"
    176           ", XF86AudioPrev, exec, playerctl previous"
    177         ];
    178 
    179         windowrulev2 = [
    180           "suppressevent maximize, class:.*"
    181           "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
    182         ];
    183       };
    184     };
    185 
    186     programs.fish = {
    187       interactiveShellInit = ''
    188         set -gx HYPRPATH (whereis Hyprland | awk '{print $NF}')
    189         if test (tty) = "/dev/tty1"; exec $HYPRPATH; end
    190       '';
    191     };
    192 
    193     dconf = {
    194       enable = true;
    195     };
    196   }