-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
hyprland.nix
294 lines (250 loc) Β· 7.5 KB
/
hyprland.nix
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
{
pkgs,
wallpaper,
home,
config,
}:
let
kitty = "kitty";
symlink = config.lib.file.mkOutOfStoreSymlink;
dotfiles = /${home.homeDirectory}/.ghq/github.com/Comamoca/dotfiles;
xremap-config = (pkgs.formats.yaml { }).generate "xremap.yml" {
modmap = [
{
name = "Global";
remap = {
Enter = {
held = "Alt_R";
alone = "Enter";
};
};
}
];
};
in
{
monitor = [
",preferred,auto,auto"
# mirroring
# "HDMI-A-1,preferred,auto,auto,mirror,eDP-1"
];
# source = "~/.config/hypr/mocha.conf";
env = [
"XCURSOR_SIZE,32"
"GDK_SCALE,2"
"HYPRCURSOR_SIZE,25"
"XCURSOR_SIZE,24"
"QT_QPA_PLATFORMTHEME,qt5ct"
];
"$terminal" = kitty;
"$browser" = "firefox";
"$fileManager" = "thunar";
"$menu" = "rofi -show drun";
input = {
kb_layout = "jp";
kb_variant = "";
kb_model = "";
kb_options = "";
kb_rules = "";
follow_mouse = "0";
mouse_refocus = false;
touchpad = {
natural_scroll = true;
};
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
};
xwayland = {
force_zero_scaling = true;
};
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = "$mauve $rosewater 45deg";
"col.inactive_border" = "$surface0";
layout = "dwindle";
allow_tearing = false;
};
decoration = {
rounding = 10;
blur = {
enabled = true;
size = 3;
passes = 1;
};
# drop_shadow = "yes";
# shadow_range = 4;
# shadow_render_power = 3;
# # TODO: Enable this
# "col.shadow" = "$surface0Alpha";
};
animations = {
enabled = "yes";
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"
];
};
# Hyprland Plugins
plugin = {
hyprfocus = {
enabled = "yes";
animate_floating = "yes";
animate_workspacechange = "yes";
focus_animation = "shrink";
# # Beziers for focus animations
# bezier = bezIn, 0.5,0.0,1.0,0.5
# bezier = bezOut, 0.0,0.5,0.5,1.0
# bezier = overshot, 0.05, 0.9, 0.1, 1.05
# bezier = smoothOut, 0.36, 0, 0.66, -0.56
# bezier = smoothIn, 0.25, 1, 0.5, 1
# bezier = realsmooth, 0.28,0.29,.69,1.08
# Flash settings
# flash {
# flash_opacity = 0.95
# in_bezier = realsmooth
# in_speed = 0.5
# out_bezier = realsmooth
# out_speed = 3
# }
# Shrink settings
shrink = {
shrink_percentage = 0.95;
in_bezier = "realsmooth";
in_speed = 1;
out_bezier = "realsmooth";
out_speed = 2;
};
};
};
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
# master {
# # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true
# }
gestures = {
workspace_swipe = "off";
};
misc = {
force_default_wallpaper = -1;
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device = {
name = "epic-mouse-v1";
sensitivity = -0.5;
};
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule = [
"float,^(Floaterm)$"
"size 25% 30%,^(Floaterm)$"
"move 60% 60%,^(Floaterm)$"
];
windowrulev2 = [
"float,class:(foot),title:(Floaterm)"
"move 70% 65%,class:(foot),title:(Floaterm)"
"size 25% 30%,class:(foot),title:(Floaterm)"
"float,class:^(firefox),title:^(γγ―γγ£γΌγ€γ³γγ―γγ£γΌ)"
"pin,class:^(firefox),title:^(γγ―γγ£γΌγ€γ³γγ―γγ£γΌ)"
"suppressevent maximize, class:.*"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# $mainMod = SUPER
"$mainMod" = "Alt";
bind = [
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
"$mainMod, Return, exec, $terminal"
"$mainMod, q, killactive,"
# bind = $mainMod, m, exit,
"$mainMod, f, togglefloating,"
"$mainMod, f, pin,"
"$mainMod, space, exec, $menu"
# bind = $mainMod, P, pseudo, # dwindle
"$mainMod, J, togglesplit," # dwindle
"$mainMod, b, exec, $browser"
# Move focus with mainMod + arrow keys
"$mainMod, h, movefocus, l"
"$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d"
# bind = $mainMod, g, movefocus, d
# Switch workspaces with mainMod + [0-9]
"$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"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, focusworkspaceoncurrentmonitor, 1"
"$mainMod SHIFT, 2, focusworkspaceoncurrentmonitor, 2"
"$mainMod SHIFT, 3, focusworkspaceoncurrentmonitor, 3"
"$mainMod SHIFT, 4, focusworkspaceoncurrentmonitor, 4"
"$mainMod SHIFT, 5, focusworkspaceoncurrentmonitor, 5"
"$mainMod SHIFT, 6, focusworkspaceoncurrentmonitor, 6"
"$mainMod SHIFT, 7, focusworkspaceoncurrentmonitor, 7"
"$mainMod SHIFT, 8, focusworkspaceoncurrentmonitor, 8"
"$mainMod SHIFT, 9, focusworkspaceoncurrentmonitor, 9"
"$mainMod SHIFT, 0, focusworkspaceoncurrentmonitor, 10"
# Example special workspace (scratchpad)
"$mainMod, w, togglespecialworkspace, magic"
"$mainMod SHIFT, w, movetoworkspace, special:magic"
"$mainMod, p, workspace, +1, focuswindow"
"$mainMod, n, workspace, -1, focuswindow"
# For Enter-Meta config
"$mainMod, o, workspace, -1, focuswindow"
"$mainMod SHIFT, p, movetoworkspace, +1"
"$mainMod SHIFT, n, movetoworkspace, -1"
"$mainMod SHIFT, l, movewindow, r"
"$mainMod SHIFT, h, movewindow, l"
# Change window size
"$mainMod ctrl, l, resizeactive, 100 100"
"$mainMod ctrl, h, resizeactive, -100 100"
# Screenshot
"$mainMod SHIFT, s, exec, slurp | grim -g - - | wl-copy"
# Take screenshot active window
# ",Print, exec, hyprctl -j activewindow | jq -r '\"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])\"' | grim -g - - | wl-copy"
# ",Print, exec, grim -o (hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') - | wl-copy"
# Take screenshot active monitor
# "$mainMod, s, exec, hyprctl -j activeworkspace | jq -r '(.monitor)' | xargs -i grim -o {} -- - | wl-copy"
",Print, exec, hyprctl -j activeworkspace | jq -r '(.monitor)' | xargs -i grim -o {} -- - | wl-copy"
# Screen lock
"Super SHIFT, l, exec, hyprlock"
# bind = Print, exec, slurp | grim -g - - | wl-cop
# Vim as as IME
"$mainMod, code:34, exec, ime.sh float"
"$mainMod, e, exec, ime.sh float"
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
exec-once = [
# "${pkgs.xremap}/bin/xremap ${xremap-config}"
"waybar"
"fcitx5"
"conky"
"swaync"
"playerctld daemon"
"swaybg -i ${wallpaper}"
"qpwgraph -am ${symlink /${dotfiles}/qpwgraph/audio.qpwgraph}"
"hyprpaper"
];
}