aboutsummaryrefslogtreecommitdiff
path: root/nixos/.flake/home/hyprland.org
blob: 725f920b0a81054a4c84add3e7e13a34c9538197 (plain)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#+title: Hyprland Configuration

Open my Hyprland configuration.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
  { config, pkgs, ... }:

  {
    wayland.windowManager.hyprland = {
      enable = true;
      settings = {
#+end_src

I have a 1440p monitor and a 1080p monitor to its left rotated to be vertical.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        monitor = [ "DP-2, 2560x1440@180, 0x0, 1" "HDMI-A-2, 1920x1080@60, -1080x-100, 1, transform, 3" ];
#+end_src

Set terminal, file manager, and menu.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        "$terminal" = "foot";
        "$fileManager" = "dolphin";
        "$menu" = "fuzzel";
#+end_src

Enable startup applications:
- =nm-applet= for network configuration
- =blueman-applet= for bluetooth configuration
- =waybar= as top bar
- =swaybg= to set wallpaper
- =mpdscribble= as Last.fm scrobbler program.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        exec-once = [
          "nm-applet &"
          "blueman-applet &"
          "waybar"
          "swaybg -m fill -i ~/.wallpaper"
          "mpdscribble"
        ];
#+end_src

Specify cursor size.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        env = [
          "XCURSOR_SIZE,24"
          "HYPRCURSOR_SIZE,24"
        ];
#+end_src

Set general appearance of the window manager.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        general = {
          gaps_in = 5;
          gaps_out = 20;
          border_size = 2;
          resize_on_border = false;
          layout = "dwindle";
          "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
          "col.inactive_border" = "rgba(595959aa)";
        };
#+end_src

Set window decorations.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        decoration = {
          rounding = 10;
          active_opacity = 1.0;
          inactive_opacity = 1.0;
          drop_shadow = true;
          shadow_range = 4;
          shadow_render_power = 3;
          "col.shadow" = "rgba(1a1a1aee)";
          blur = {
            enabled = true;
  	        size = 3;
  	        passes = 1;
  	        vibrancy = "0.1696";
          };
        };
#+end_src

Set window animations.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        animations = {
          enabled = true;
          bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
          animation = [
            "windows, 1, 7, myBezier"
  	        "windowsOut, 1, 7, default, popin 80%"
  	        "border, 1, 10, default" "borderangle, 1, 8, default"
  	        "fade, 1, 7, default" "workspaces, 1, 6, default"
          ];
        };
#+end_src

Configure layouts.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        dwindle = {
          pseudotile = true;
          preserve_split = true;
        };
        master = {
          new_status = "master";
        };
#+end_src

Configure the inputs.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        input = {
          kb_layout = "us";
          follow_mouse = 1;
          sensitivity = 0;
        };
#+end_src

Configure window manager controls.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
        "$mainMod" = "SUPER";
        bind = [
          "$mainMod, RETURN, exec, $terminal"
          "$mainMod SHIFT, Q, killactive"
          "$mainMod, E, exec, $fileManager"
          "$mainMod SHIFT, SPACE, togglefloating"
          "$mainMod, D, exec, $menu"
          "$mainMod, P, pseudo"
          "$mainMod SHIFT, E, togglesplit"
          "$mainMod, H, movefocus, l"
          "$mainMod, J, movefocus, d"
          "$mainMod, K, movefocus, u"
          "$mainMod, L, movefocus, r"
          "$mainMod, 1, workspace, 1"
          "$mainMod, 2, workspace, 2"
          "$mainMod, 3, workspace, 3"
          "$mainMod, 4, workspace, 4"
          "$mainMod, 5, workspace, 5"
          "$mainMod, 6, workspace, 6"
          "$mainMod, 7, workspace, 7"
          "$mainMod, 8, workspace, 8"
          "$mainMod, 9, workspace, 9"
          "$mainMod, 0, workspace, 10"
          "$mainMod SHIFT, 1, movetoworkspace, 1"
          "$mainMod SHIFT, 2, movetoworkspace, 2"
          "$mainMod SHIFT, 3, movetoworkspace, 3"
          "$mainMod SHIFT, 4, movetoworkspace, 4"
          "$mainMod SHIFT, 5, movetoworkspace, 5"
          "$mainMod SHIFT, 6, movetoworkspace, 6"
          "$mainMod SHIFT, 7, movetoworkspace, 7"
          "$mainMod SHIFT, 8, movetoworkspace, 8"
          "$mainMod SHIFT, 9, movetoworkspace, 9"
          "$mainMod SHIFT, 0, movetoworkspace, 10"
          "$mainMod CONTROL, L, exec, hyprlock"
          "$mainMod, S, exec, hyprshot -m window --clipboard-only"
          "$mainMod SHIFT, S, exec, hyprshot -m region --clipboard-only"
          "$mainMod SHIFT CONTROL, S, exec, hyprshot -m output --clipboard-only"
          "$mainMod, M, exec, ~/.local/bin/poweroptions.sh"
          "$mainMod, F, fullscreen"
        ];
        bindel = [
          ",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
          ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
          ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
          ",XF86Eject, exec, mpc toggle"
        ];
        bindm = [
          "$mainMod, mouse:272, movewindow"
          "$mainMod, mouse:273, resizewindow"
        ];
        windowrulev2 = "suppressevent maximize, class:.*";
#+end_src

Close my Hyprland configuration.
#+begin_src nix :tangle ~/.flake/home/hyprland.nix :mkdirp yes
      };
    };
  }
#+end_src