-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhyprland-config.nix
192 lines (166 loc) · 7.98 KB
/
hyprland-config.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
# hyprland-config.nix
{ config, pkgs, ... }: {
wayland.windowManager.hyprland.extraConfig = ''
# Monitor Configuration
monitor=,preferred,auto,1
#monitor=,3840x2160,1920x0,1
# Executions on Startup
exec-once = rm -f $XDG_RUNTIME_DIR/wob.sock && mkfifo $XDG_RUNTIME_DIR/wob.sock && tail -f $XDG_RUNTIME_DIR/wob.sock | wob # Initialise wob
exec-once = blueman-applet # Launch blueman
exec-once = hyprpaper # Start hyprpaper
exec-once = systemctl --user import-environment # Ensure environment variables for user systemd units
exec-once = mako # Launch mako
exec-once = hyprctl setcursor DMZ-White 24 # Set cursor
exec-once = waybar # Launch waybar
exec-once = clipse -listen
# Environmental Variables
env = WLR_NO_HARDWARE_CURSORS,1
# Input Configuration
input {
sensitivity = 0.5
kb_layout = us # Keyboard layout
touchpad {
natural_scroll = true # Touchpad natural scroll
clickfinger_behavior = 1 # Click finger behavior
}
follow_mouse = 0 # Disable focus change on hover
float_switch_override_focus = 0 # Disable focus change on float
}
# General Configuration
general {
gaps_in = 6 # Inner gaps
gaps_out = 7 # Outer gaps
border_size = 3 # Border size
col.active_border = rgba(5289E2ee) rgba(6897BBee) 45deg # Active border color
col.inactive_border = rgba(595959aa) # Inactive border color
layout = hy3 # Layout type
no_cursor_warps = true # No cursor warps
}
# Misc Configuration
misc {
disable_hyprland_logo = true # Disable hyprland logo
disable_splash_rendering = true # Disable splash rendering
mouse_move_focuses_monitor = false # Disable move monitor focus with mouse
}
# Window Rules
windowrulev2 = opacity 0.7 0.7,title:^(Volume Control)$
windowrulev2 = opacity 0.8 0.8,title:^(Bluetooth Devices)$
windowrulev2 = opacity 0.8 0.8,title:^(wdisplays)$
windowrulev2 = opacity 0.7 0.7,class:^(google-chrome)$
windowrulev2 = opacity 0.9 0.9,class:^(emacs)$
windowrulev2 = opacity 0.7 0.7,class:^(Slack)$
windowrulev2 = opacity 0.8 0.8,class:^(pavucontrol)$
windowrulev2 = opacity 0.7 0.7,class:^(Code)$
windowrulev2 = opacity 0.8 0.8,class:^(docker-compose)$
windowrulev2 = opacity 0.7 0.7,class:^(Insomnia)$
windowrulev2 = opacity 0.7 0.7,class:^(helix)$
windowrulev2 = float,class:(clipse)
windowrulev2 = size 622 652,class:(clipse)
# Decoration Configuration
decoration {
rounding = 10 # Rounding factor
blur {
enabled = true # Enable blur
size = 3 # Blur size
passes = 2 # Blur passes
}
drop_shadow = true # Enable drop shadow
shadow_range = 4 # Shadow range
shadow_render_power = 3 # Shadow render power
col.shadow = rgba(1a1a1aee) # Shadow color
}
# Animations Configuration
animations {
enabled = true
bezier = myBezier, 0.05, 0.9, 0.1, 1.05 # Bezier curve settings
animation = windows, 1, 7, myBezier # Windows animation
animation = windowsOut, 1, 7, default, popin 80% # Windows out animation
animation = border, 1, 10, default # Border animation
animation = borderangle, 1, 8, default # Border angle animation
animation = fade, 1, 7, default # Fade animation
animation = workspaces, 1, 6, default # Workspaces animation
}
# Master Configuration
master {
new_is_master = true # Set new window as master
}
# Gestures Configuration
gestures {
workspace_swipe = false # Workspace swipe gesture
}
# Device Configuration
# device:epic-mouse-v1 {
# sensitivity = -0.5 # Sensitivity setting
# }
# Main Modification Key
$mainMod = SUPER
# System Control Bindings
bind = $mainMod_SHIFT, C, exec, hyprctl reload && pkill waybar && nohup waybar > /dev/null 2>&1 & pkill mako && nohup mako > /dev/null 2>&1 &
# Reload system config
bind = $mainMod_SHIFT, Q, killactive # Kill active window
bind = $mainMod, ESCAPE, exec, swaylock --clock --screenshots --effect-blur 7x5 # Lock screen
bind = $mainMod, BACKSPACE, hy3:makegroup, opposite, ephemeral # Toggle split
bind = $mainMod_SHIFT, E, exit # Exit system
bind = $mainMod_SHIFT, V, togglefloating # float current window
# Application Bindings
bind = $mainMod, RETURN, exec, alacritty # Open terminal
bind = $mainMod, SPACE, exec, rofi -show drun # Launch rofi
bind = $mainMod, S, exec, pavucontrol # Open sound control
bind = $mainMod, N, exec, alacritty -e sh -c 'sleep 0.1; nmtui' # Open network manager
bind = $mainMod, D, exec, wdisplays # Display settings
bind = $mainMod, B, exec, blueman-manager # Bluetooth manager
bind = $mainMod_SHIFT, RETURN, exec, google-chrome-stable # Launch Chrome
# Audio Control Bindings
bind = , XF86AudioRaiseVolume, exec, amixer sset Master unmute; exec amixer sset Master 5%+ | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $XDG_RUNTIME_DIR/wob.sock
bind = , XF86AudioLowerVolume, exec, amixer sset Master unmute; exec amixer sset Master 5%- | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $XDG_RUNTIME_DIR/wob.sock
bind = , XF86AudioMute, exec, amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > $XDG_RUNTIME_DIR/wob.sock
# Brightness Control Bindings
bind = , XF86MonBrightnessUp, exec, brightnessctl set +5%
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- -n 10%
# Screenshot Binding
bind = $mainMod, P, exec, grim -g "$(slurp)" - | swappy -f -
# Move focus with mainMod + arrow keys
bind = $mainMod, left, hy3:movefocus, l
bind = $mainMod, right, hy3:movefocus, r
bind = $mainMod, up, hy3:movefocus, u
bind = $mainMod, down, hy3:movefocus, d
# Move window with mainMod + SHIFT + arrow keys
bind = $mainMod SHIFT, left, hy3:movewindow, l
bind = $mainMod SHIFT, right, hy3:movewindow, r
bind = $mainMod SHIFT, up, hy3:movewindow, u
bind = $mainMod SHIFT, down, hy3: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
# Clipse bind
bind = SUPER, V, exec, alacritty --class clipse -e 'clipse'
# weather CLI
bind = SUPER, W, exec, alacritty -e sh -c 'sleep 0.1; weather; sleep 1000000'
# Lid switch event
# bindl=,switch:Lid Switch,exec,swaylock --clock --image //home/michael/Pictures/screensaver.jpg # Lock screen
# Full screen a windoc
bind=SUPER,F,fullscreen
# Resize window & move floating window
bindm = $mainMod, mouse:272, resizewindow
bindm = CTRL, mouse:273, movewindow
'';
}