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
|
{
config,
lib,
...
}:
let
cfg = config.nixfiles.modules.hyprland;
in
{
options.nixfiles.modules.hyprland.enable = lib.mkEnableOption "Hyprland";
config = lib.mkIf cfg.enable {
nixfiles.modules.wayland.enable = true;
hm = {
stylix.targets.hyprland.enable = false;
wayland.windowManager.hyprland = {
enable = true;
systemd = {
enable = true;
variables = [ "--all" ];
};
settings = {
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
general = {
gaps_in = 0;
gaps_out = 0;
};
decoration = {
blur.enabled = false;
};
animations.enabled = false;
debug.disable_logs = false;
input = with config.services.xserver.xkb; {
kb_layout = layout;
kb_variant = variant;
kb_options = options;
repeat_delay = config.services.xserver.autoRepeatDelay;
repeat_rate = config.services.xserver.autoRepeatInterval;
};
bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"
"SUPER ALT, mouse:272, resizewindow"
];
bind =
[
"SUPER SHIFT, E, exec, pkill Hyprland"
"SUPER, D, killactive,"
"SUPER, F, fullscreen,"
"SUPER, G, togglegroup,"
"SUPER SHIFT, N, changegroupactive, f"
"SUPER SHIFT, P, changegroupactive, b"
"SUPER, R, togglesplit,"
"SUPER, T, togglefloating,"
"SUPER, P, pseudo,"
"SUPER ALT, ,resizeactive,"
"SUPER, Return, exec, foot"
"SUPER, L, exec, pgrep hyprlock || hyprlock"
"SUPER, H, movefocus, l"
"SUPER, J, movefocus, d"
"SUPER, K, movefocus, u"
"SUPER, L, movefocus, r"
"SUPER SHIFT, H, movewindow, l"
"SUPER SHIFT, J, movewindow, d"
"SUPER SHIFT, K, movewindow, u"
"SUPER SHIFT, L, movewindow, r"
"SUPER ALT, H, resizeactive, 10 0"
"SUPER ALT, J, resizeactive, 0 10"
"SUPER ALT, K, resizeactive, 0 -10"
"SUPER ALT, L, resizeactive, -10 0"
", XF86AudioPlay, exec, mpc play"
", XF86AudioPrev, exec, mpc prev"
", XF86AudioNext, exec, mpc next"
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ .1+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ .1-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
]
++ (builtins.concatLists (
builtins.genList (
x:
let
ws =
let
c = (x + 1) / 10;
in
toString (x + 1 - (c * 10));
in
[
"SUPER, ${ws}, workspace, ${toString (x + 1)}"
"SUPER SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
) 10
));
};
};
programs.hyprlock.enable = true;
};
programs.hyprland.enable = true;
};
}
|