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
|
{ pkgs, lib, config, ... }:
{
imports = [
./waybar.nix
./rofi.nix
./mako.nix
];
options = {
hyprland.enable = lib.mkEnableOption "enable hyprland";
};
config = lib.mkIf config.hyprland.enable {
waybar.enable = true;
rofi.enable = true;
mako.enable = true;
home.packages = with pkgs; [
swww
brightnessctl
grimblast
cliphist
polkit_gnome
xwaylandvideobridge
wl-clipboard
];
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
];
configPackages = with pkgs; [
xdg-desktop-portal-hyprland
];
};
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.hyprland;
settings = {
"$scripts" = "${./attachments/hypr-scripts}";
"$mainMod" = "SUPER";
"$terminal" = "alacritty";
exec-once = [
"emacs --daemon"
"swww-daemon"
"swww img ${config.wallpaper}"
];
monitor = ",preferred,auto,1,mirror,eDP-1";
input = {
kb_layout = "us,ru";
kb_options = "grp:win_space_toggle";
touchpad = {
natural_scroll = "yes";
disable_while_typing = "no";
};
sensitivity = 0.1;
};
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 3;
layout = "dwindle";
allow_tearing = false;
};
decoration = {
rounding = 7;
drop_shadow = "yes";
shadow_range = 4;
shadow_render_power = 3;
blur = {
enabled = true;
size = 3;
passes = 1;
};
};
animations = {
enabled = 1;
bezier = "overshot,0.13,0.99,0.29,1.1,";
animation = [
"fade,1,4,default"
"workspaces,1,4,default,fade"
"windows,1,4,overshot,popin 95%"
];
};
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
master.new_is_master = true;
gestures.workspace_swipe = "on";
misc.force_default_wallpaper = 1;
windowrulev2 = [
"float, title:^(Firrfox — Sharing Indicator)$"
"noborder, title:^(Firefox — Sharing Indicator)$"
"rounding 0, title:^(Firefox — Sharing Indicator)$"
"float, title:^(firefox)$, title:^(Picture-in-Picture)$"
"pin, title:^(firefox)$, title:^(Picture-in-Picture)$"
"float, title:^(Save File)$"
"pin, title:^(Save File)$"
"float, title:^(Torrent Options)$"
"pin, title:^(Torrent Options)$"
"opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$"
"noanim,class:^(xwaylandvideobridge)$"
"noinitialfocus,class:^(xwaylandvideobridge)$"
"maxsize 1 1,class:^(xwaylandvideobridge)$"
"noblur,class:^(xwaylandvideobridge)$"
"windowdance,class:^(kompas.exe)$,title:^(RoamingWindow)$"
"stayfocused,class:^(kompas.exe)$,title:^(RoamingWindow)$"
];
windowrule = [
"windowdance,title:^(Rhythm Doctor)$"
"forceinput,title:^(Rhythm Doctor)$"
];
layerrule = "blur, waybar";
bind = [
"$mainMod, V, togglefloating, "
"$mainMod, P, pseudo,"
"$mainMod, I, togglesplit,"
"$mainMod, F, fullscreen, 0"
"$mainMod, M, fullscreen, 1"
"$mainMod SHIFT,F,fakefullscreen"
"$mainMod SHIFT, Q, killactive, "
"$mainMod SHIFT, E, exit,"
# Apps
"$mainMod, D, exec, killall rofi || rofi -show-icons -show drun"
"$mainMod, Q, exec, $terminal"
"$mainMod, B, exec, firefox"
"$mainMod, T, exec, telegram-desktop"
"$mainMod, E, exec, emacsclient -c -a emacs"
"$mainMod CONTROL, E, exec, emacs"
"$mainMod SHIFT, Esc, exec, swww img ${config.wallpaper}"
# Screenshooting
", Print, exec, grimblast save screen"
"ALT, Print, exec, grimblast save active"
"SHIFT, Print, exec, grimblast save area"
"CONTROL, Print, exec, grimblast copy screen"
"ALT_CONTROL, Print, exec, grimblast copy active"
"CONTROL_SHIFT, Print, exec, grimblast copy area "
# Volume
",0x1008FF11,exec,wpctl set-volume @DEFAULT_SINK@ 5%-"
",0x1008FF13,exec,wpctl set-volume @DEFAULT_SINK@ 5%+"
",0x1008FF12,exec,wpctl set-mute @DEFAULT_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
# Brightness
",XF86MonBrightnessUp,exec,brightnessctl s +5%"
",XF86MonBrightnessDown,exec,brightnessctl s 5%-"
# Windows
"$mainMod, J, movefocus, d"
"$mainMod, K, movefocus, u"
"$mainMod, H, movefocus, l"
"$mainMod, L, movefocus, r"
"SUPER_SHIFT,J,movewindow,d"
"SUPER_SHIFT,K,movewindow,u"
"SUPER_SHIFT,H,movewindow,l"
"SUPER_SHIFT,L,movewindow,r"
"$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, S, movetoworkspace, special:magic"
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
] ++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
"$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
]
)
10)
);
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
};
};
};
}
|