DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: be1da194a2ac3cd6381f48b8fb2538f9ae157168 nix-arta/roles/hyprland.nix -rw-r--r-- 3.3 KiB
be1da194Jonni Liljamo feat(hosts/alice): nextcloud-client 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.roles.hyprland;
in {
  options.roles.hyprland = {
    enable = lib.mkEnableOption "enable hyprland";
  };

  config = lib.mkIf cfg.enable {
    environment.systemPackages = [pkgs.bemenu];

    programs.hyprland.enable = true;

    hm = {
      wayland.windowManager.hyprland = {
        enable = true;
        settings = {
          monitor = [
            "eDP-1,1920x1080@60,0x0,1"
          ];

          exec-once = [
            "wpaperd"
          ];

          general = {
            border_size = 1;
            gaps_in = 2;
            gaps_out = 2;
          };

          decoration = {
            rounding = false;
            drop_shadow = false;
            blur = {
              enabled = false;
            };
          };

          animations = {
            enabled = false;
            first_launch_animation = false;
          };

          input = {
            kb_layout = "us,fi,no";
            kb_options = "grp:win_space_toggle,ctrl:nocaps";
            accel_profile = "flat";
            touchpad = {
              disable_while_typing = false;
            };
          };

          misc = {
            disable_hyprland_logo = true;
            disable_splash_rendering = true;
          };

          "$mod" = "SUPER";
          bind = [
            "$mod, Return, exec, kitty"
            "$mod SHIFT, return, exec, bemenu-run"
            "$mod SHIFT, x, exec, hyprlock"

            "$mod SHIFT, c, killactive"
            "$mod SHIFT, q, exit"

            "$mod, f, fullscreen, 0"
            "$mod SHIFT, space, togglefloating"

            "$mod, Tab, cyclenext,"
            "$mod, Tab, bringactivetotop,"

            "$mod, h, movefocus, l"
            "$mod, j, movefocus, d"
            "$mod, k, movefocus, u"
            "$mod, l, movefocus, r"
            "$mod SHIFT, h, movewindow, l"
            "$mod SHIFT, j, movewindow, d"
            "$mod SHIFT, k, movewindow, u"
            "$mod SHIFT, l, movewindow, r"

            "$mod, 1, workspace, 1"
            "$mod, 2, workspace, 2"
            "$mod, 3, workspace, 3"
            "$mod, 4, workspace, 4"
            "$mod SHIFT, 1, movetoworkspace, 1"
            "$mod SHIFT, 2, movetoworkspace, 2"
            "$mod SHIFT, 3, movetoworkspace, 3"
            "$mod SHIFT, 4, movetoworkspace, 4"
          ];
          binde = [
            "$mod CTRL, h, resizeactive, -10 0"
            "$mod CTRL, j, resizeactive, 0 -10"
            "$mod CTRL, k, resizeactive, 0 10"
            "$mod CTRL, l, resizeactive, 10 0"
          ];

          bindm = [
            "$mod, mouse:272, movewindow"
            "$mod, mouse:273, resizewindow"
          ];
        };
      };

      services.hypridle = {
        enable = true;
        settings = {
          listener = [
            {
              timeout = 500;
            }
          ];
          general.lock_cmd = "hyprlock";
        };
      };

      programs.hyprlock = {
        enable = true;
        settings = {
          background = [
            {
              path = "/home/skye/dev/femboys.png";
            }
          ];
        };
      };

      programs.wpaperd = {
        enable = true;
        settings = {
          eDP-1 = {
            path = "/home/skye/wallpapers/middleearth";
            duration = "5m";
          };
        };
      };
    };
  };
}