/
default.nix
300 lines (292 loc) · 11.5 KB
/
default.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
295
296
297
298
299
300
{pkgs, lib, config, inputs, ... }:
{
home.packages = with pkgs; [
wl-clipboard
grim
slurp
swww
rofi-wayland
waybar
];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# No longer exists as it is not necessary.
xwayland.enable = true;
extraConfig = /* hyprlang*/ ''
# vim: filetype=hyprlang
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
#autogenerated = 1 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=DP-1,2560x1080@200,0x-1080,1,vrr,1
monitor=DP-3,2560x1080@200,0x0,1,vrr,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
source = ~/.config/hypr/binds.conf
source = ~/.config/hypr/window_rules.conf
source = ~/.config/hypr/startup.conf
source = ~/.config/hypr/workspaces.conf
# Some default env vars.
env = XCURSOR_SIZE,24
# env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
# env = GBM_BACKEND,nvidia-drm
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
env = SUDO_ASKPASS, $HOME/.local/bin/dmenupass
env = NIXPKGS_ALLOW_UNFREE,1
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_rules =
# kb_options = caps:Super_L
follow_mouse = 1
accel_profile = flat
force_no_accel = true
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
# gaps_in = 5
# gaps_out = 15
border_size = 3
col.active_border = rgb(711C91) rgb(EA00D9) rgb(0abdc6) 45deg
col.inactive_border = rgb(133e7c) rgb(091833) 45deg
layout = dwindle
allow_tearing = false
}
env = WLR_DRM_NO_ATOMIC,1
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
# blur_ignore_opacity = true
rounding = 10
drop_shadow = yes
blur {
enabled = true
size = 12
passes = 3
new_optimizations = on
noise = 0.05
ignore_opacity = true
}
# fullscreen_opacity = 0.7
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations { #Thank you to HyprDots
enabled = yes
bezier = wind, 0.05, 0.9, 0.1, 1.05
bezier = winIn, 0.1, 1.1, 0.1, 1.1
bezier = winOut, 0.3, -0.3, 0, 1
bezier = liner, 1, 1, 1, 1
animation = windows, 1, 6, wind, slide
animation = windowsIn, 1, 6, winIn, slide
animation = windowsOut, 1, 5, winOut, slide
animation = windowsMove, 1, 5, wind, slide
animation = border, 1, 1, liner
animation = borderangle, 1, 30, liner, loop
animation = fade, 1, 10, default
animation = workspaces, 1, 5, wind
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = 0
preserve_split = 1
force_split = 2
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
}
binds {
allow_workspace_cycles = yes
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
blurls = dashboard
'';
};
home.file."${config.xdg.configHome}/hypr/scripts" = {
source = ./scripts;
recursive = true;
};
home.file."${config.xdg.configHome}/hypr/binds.conf".text = /* hyprlang */ ''
# vim: filetype=hyprlang
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = ALT, escape, fakefullscreen
bind = $mainMod, Return, exec, ${pkgs.kitty}/bin/kitty
bind = $mainMod, O, killactive,
bind = $mainMod SHIFT, D, exec, ps aux |rg [d]iscord | awk '{ print $2 }' |xargs kill
bind = $mainMod, M, exit,
bind = $mainMod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t
bind = $mainMod, R, exec,hyprctl reload
bind = $mainMod, E, exec, ~/.local/bin/dmenuunicode
bind = $mainMod, S, exec, ~/.config/eww/scripts/search_nixpkgs.sh
# bind = $mainMod, V, exec, ${pkgs.youtube-music}/bin/youtube-music --disable-gpu
bind = $mainMod, G, exec, ~/.config/hypr/scripts/gamelauncher.sh 2
# bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, V, exec, ${pkgs.kitty}/bin/kitty --title clipse -e zsh -c '${pkgs.clipse}/bin/clipse $PPID' # bind the open clipboard operation to a nice key.
bind = $mainMod, I, exec, ~/.scripts/scrn_record.sh
bind = $mainMod, C, exec, ${pkgs.kitty}/bin/kitty ${pkgs.helix}/bin/hx ~/.dotfiles/nixos
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Move Windows
bind = SUPER SHIFT, left, movewindow, l
bind = SUPER SHIFT, right, movewindow, r
bind = SUPER SHIFT, up, movewindow, u
bind = SUPER SHIFT, down, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Enable Floating on Windows
bind = $mainMod SHIFT, space,togglefloating
# Discord PPT
bind = ,Insert,pass,^(.*discord*.)$
# FKey binds
bind = $mainMod, F1, exec, ~/.config/hypr/scripts/show_binds.sh
bind = $mainMod, F2, exec, ~/.local/bin/dmenumount
bind = $mainMod, F3, exec, ~/.local/bin/dmenuumount
# Other
bind = $mainMod, T, exec, ${pkgs.xfce.thunar}/bin/thunar
bind = $mainMod, B, exec, ${pkgs.kitty}/bin/kitty ${pkgs.btop}/bin/btop
bind = $mainMod, H, exec, $HOME/.config/eww/scripts/eww-start.sh &
# Kill discord
bind = $mainMod SHIFT, D, exec, \'\'ps aux | rg [d]iscord | awk '{ print $2 }' | xargs kill\'\'
# bind = $mainMod, U, exec, brave
bind = $mainMod, U, exec, ${pkgs.firefox}/bin/firefox
bind = $mainMod, D, exec, ~/.config/rofi/launchers/launcher.sh
bind = ALT, space, exec, ~/.config/rofi/launchers/launcher.sh
bind = $mainMod, Y, exec, ~/.local/bin/yt
bind = $mainMod,F,fullscreen
bind = $mainMod,TAB,workspace,previous
bind = $mainMod SHIFT,s,exec, ~/.config/hypr/scripts/screenshot --area
bind = $mainMod,x,exec, ${pkgs.wlogout}/bin/wlogout
# bind = $mainMod,x,exec, ~/.config/rofi/powermenu/powermenu.sh
bind = $mainMod,l,exec, ~/.config/hypr/scripts/locker.sh
'';
home.file."${config.xdg.configHome}/hypr/startup.conf".text = /* hyprlang */ ''
# vim: filetype=hyprlang
exec = bash $HOME/.config/hypr/scripts/hypronstart.sh
exec = ${pkgs.clipse}/bin/clipse -kill ;sleep 1; ${pkgs.clipse}/bin/clipse -listen
exec-once = ${pkgs.swww}/bin/swww init
exec-once = ${pkgs.openrgb}/bin/openrgb -p ~/.config/OpenRGB/Purple.orp
# exec = $HOME/.scripts/background/cron.sh ~/Pictures/Space/
exec-once = ${pkgs.discord}/bin/discord &
# exec-once = /etc/profiles/per-user/USER_NAME/bin/brave
exec-once = ${pkgs.firefox}/bin/firefox &
exec-once = ~/.config/hypr/scripts/sleep.sh & #Systemctl service works now for some reason
exec = sleep 1 ; bash $HOME/.config/eww/scripts/eww-start.sh &
exec = sleep 0.5 ; ${pkgs.eww}/bin/eww -c ~/.config/eww/bar close bar; ${pkgs.eww}/bin/eww -c ~/.config/eww/bar open bar &
'';
home.file."${config.xdg.configHome}/hypr/window_rules.conf".text = /* hyprlang */ ''
# vim: filetype=hyprlang
# Example windowrule v1
windowrulev2 = tile,class:^(.*Warp.*)$
windowrulev2 = float,class:^(kitty.*)$,title:^(.*clipse.*)$
windowrulev2 = size 546 552,class:^(kitty.*)$,title:^(.*clipse.*)$
windowrulev2 = opacity 0.5 0.5,class:^(kitty.*)$,title:^(.*clipse.*)$
windowrule = float, ^(pavucontrol)$
windowrulev2 = float, class:^(.*desktop-portal-gtk.*)$
windowrule = opacity 0.9 0.8, firefox
windowrulev2 = opacity 0.95 0.90, class:discord
windowrulev2 = opacity 1.0 1.0, title:^(.*YouTube.*)$
# windowrulev2 = float, class:^(*.steam_app.*)$
windowrulev2 = fullscreen, class:^(*.steam_app.*)$
windowrulev2 = opacity 1.0 1.0 , class:^(*.steam_app.*)$
windowrulev2 = float, class:(steam)
windowrulev2 = tile, class:(steam),title:^(.*Steam.*)$
windowrulev2 = size 842 465, class:thunar
windowrulev2 = opacity 0.83 0.83, class:thunar
windowrulev2 = opacity 0.95 0.93, title:^(.*nvim.*)$
windowrulev2 = float,class:^(thunar)$
windowrulev2 = size 842 465, class:Thunar
windowrulev2 = opacity 0.83 0.83, class:Thunar
windowrulev2 = float,class:^(Thunar)$
windowrulev2 = opacity 1.0 1.0, class:^(mpv)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# App Workspace Bindings
windowrule = workspace 1, ^(.*firefox.*)$
# windowrule = workspace 1, ^(.*brave.*)$
windowrulev2 = workspace 3, class:^(.*steam_app.*)$
windowrule = workspace 9, ^(.*mpv.*)$
windowrule = workspace 7, ^(.*discord.*)$
windowrulev2 = workspace 6, class:^(.*YouTube Music.*)$
# XWaylandBridge
windowrulev2 = opacity 0.75 0.6, class:^.*kitty.*$
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = nofocus,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
# Fix steam menu
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
# Idle Inhibit
windowrulev2 = idleinhibit focus, title:.*(yuzu).*
windowrulev2 = idleinhibit focus, class:.*(steam_app).*
windowrulev2 = idleinhibit always, class:firefox,title:^(.*S[0-9].*E[0-9].*)$
windowrulev2 = idleinhibit always, class:firefox,title:^(.*YouTube.*)$
'';
home.file."${config.xdg.configHome}/hypr/workspaces.conf".text = /* hyprlang */ ''
# vim: filetype=hyprlang
# Workspace Binding.
workspace = 1,monitor:DP-3,rounding:true,decorate:true,gapsin:5,gapsout:15
workspace = 2,monitor:DP-3,rounding:true,decorate:true,gapsin:5,gapsout:15
workspace = 3,monitor:DP-3,rounding:true,decorate:true,gapsin:5,gapsout:15
workspace = 4,monitor:DP-3,rounding:true,decorate:true,gapsin:5,gapsout:15
workspace = 5,monitor:DP-3,rounding:true,decorate:true,gapsin:5,gapsout:15
workspace = 6,monitor:DP-1,rounding:true,decorate:true,gapsin:0,gapsout:0
workspace = 7,monitor:DP-1,rounding:true,decorate:true,gapsin:0,gapsout:0
workspace = 8,monitor:DP-1,rounding:true,decorate:true,gapsin:0,gapsout:0
workspace = 9,monitor:DP-1,rounding:true,decorate:true,gapsin:0,gapsout:0
workspace = 10,monitor:DP-1,rounding:true,decorate:true,gapsin:0,gapsout:0
'';
}