DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 544542a80f21802a7f53e0a1e5e2f14b92f960fa nix-arta/roles/hyprland.nix -rw-r--r-- 3.8 KiB
544542a8Jonni Liljamo feat: hyprland workspace tomfoolery a month 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
145
146
147
148
149
150
151
152
153
154
155
{
  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;

    security.pam.services.hyprlock = {};

    hm = {
      wayland.windowManager.hyprland = {
        enable = true;
        # NOTE: These are just the default settings.
        settings = {
          exec-once = [
            "wpaperd -d"
          ];

          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, w, exec, wpaperctl next"

            "$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, 5, workspace, 5"
            "$mod, 6, workspace, 6"
            "$mod, 7, workspace, 7"
            "$mod SHIFT, 1, movetoworkspace, 1"
            "$mod SHIFT, 2, movetoworkspace, 2"
            "$mod SHIFT, 3, movetoworkspace, 3"
            "$mod SHIFT, 4, movetoworkspace, 4"
            "$mod SHIFT, 5, movetoworkspace, 5"
            "$mod SHIFT, 6, movetoworkspace, 6"
            "$mod SHIFT, 7, movetoworkspace, 7"
          ];
          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 = {
          general = {
            no_fade_in = true;
            no_fade_out = true;
          };
          background = [
            {
              #path = "/home/skye/dev/femboys.png";
              color = "rgba(255, 255, 255, 1.0)";
            }
          ];
          input-field = [
            {
              monitor = "";
              size = "200, 50";
              position = "0, 0";
            }
          ];
        };
      };

      programs.wpaperd.enable = true;
    };
  };
}