Repository navigation
Expand file tree
/
Copy pathhome.nix
More file actions
351 lines (313 loc) · 9.42 KB
/
Copy pathhome.nix
File metadata and controls
351 lines (313 loc) · 9.42 KB
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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
{ config, pkgs, ... }:
let
rofi-power-menu = pkgs.writeShellScriptBin "rofi-power-menu" ''
#! /usr/bin/env sh
# Find full paths to binaries to ensure they run
SYSTEMCTL_PATH=$(command -v systemctl)
HYPRCTL_PATH=$(command -v hyprctl)
SWAYLOCK_PATH=$(command -v swaylock)
# Define the theme string for a small menu in the top-right.
# This is the key to making it a "tooltip menu".
THEME_STR="
window {
location: north east;
anchor: north east;
x-offset: -10px;
y-offset: 40px; /* Adjust this to match your bar's height */
width: 180px;
border-radius: 8px;
background-color: #1a1b26; /* Tokyo Night background */
}
mainbox {
children: [ listview ];
}
listview {
lines: 5;
columns: 1;
scrollbar: false;
background-color: transparent;
}
element {
padding: 8px;
border-radius: 6px;
}
element-text {
background-color: inherit;
text-color: inherit;
}
element.normal.normal {
background-color: #1a1b26; /* Tokyo Night background */
text-color: #c0caf5; /* Tokyo Night foreground */
}
element.selected.normal {
background-color: #7aa2f7; /* Tokyo Night blue for selection */
text-color: #1a1b26;
}
"
# Use printf for a reliable, multi-line string
OPTIONS="Lock\nLogout\nSuspend\nReboot\nShutdown"
# Run Rofi with the theme string
SELECTED_OPTION=$(printf "$OPTIONS" | rofi -dmenu -i -p "Power" -theme-str "$THEME_STR")
# Execute command based on selection
case "$SELECTED_OPTION" in
"Lock")
exec $SWAYLOCK_PATH
;;
"Logout")
$HYPRCTL_PATH dispatch exit
;;
"Suspend")
$SYSTEMCTL_PATH suspend
;;
"Reboot")
$SYSTEMCTL_PATH reboot
;;
"Shutdown")
$SYSTEMCTL_PATH poweroff
;;
esac
'';
in
{
home.username = "neologer";
home.homeDirectory = "/home/neologer";
home.stateVersion = "25.05";
programs.bash = {
enable = true;
shellAliases = {
btw = "echo I sue nixos with Home Manager btw!";
};
initExtra = ''
export PS1='\[\e[38;5;31m\]\u\[\e[0m\] \[\e[38;5;50;1m\]in\[\e[0m\]\w \\$ '
'';
};
home.packages = with pkgs; [
networkmanager # Provides nmcli for the network module
upower # Provides upower for the battery module
dbus # Provides dbus-update-activation-environment
fastfetch
bat
rofi
mesa # Provides glxinfo
pavucontrol # GUI for volume control
waybar # The status bar
rofi-power-menu # My custome power menue
swaylock
ags # Aylur's Gtk Shell (for bar, widgets, etc.)
hyprcursor
zsh
oh-my-posh
lsd
obsidian
gimp
krita
blender
vlc
imv
amberol
superfile
#vesktop
];
programs.neovim.enable = true;
gtk = {
enable = true;
theme.name = "Tokyo-Night-Dark-B";
iconTheme.name = "Papirus-Dark";
};
wayland.windowManager.hyprland = {
enable = true;
settings = {
# Set the main modifier key
"$mod" = "SUPER";
# --- Initial Setup & Autostart ---
# Execute something on launch
exec-once = "waybar"; # Example: start a status bar
# --- LAYOUT ENGINE CONTROL ---
general = {
# This is the key setting. Change from the default "dwindle" to "master".
layout = "master";
gaps_in = 2;
gaps_out = 5;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
};
# --- MASTER LAYOUT SPECIFIC SETTINGS ---
master = {
new_status = "inherit";
# When you create a new window, the split is on the right side of the master
new_on_top = false;
# Size of the master area (0.5 means 50% of the screen)
mfact = 0.55;
};
# --- Look and Feel ---
decoration = {
# Rounded corners
rounding = 4;
};
animations = {
enabled = true;
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin"
"border, 1, 10, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
# --- Keybindings ---
bind = [
# Your requested bindings
"$mod, RETURN, exec, kitty" # Open terminal
"$mod, Q, killactive," # Close active window
"$mod, B, exec, brave" # Open Brave
# Popular suggestion: Application Launcher (Rofi)
"$mod, D, exec, rofi -show drun" # 'drun' shows desktop applications
# Window Management
"$mod, F, fullscreen," # Toggle fullscreen
"$mod, SPACE, togglefloating," # Toggle window between tiling/floating
"$mod SHIFT, C, killactive," # Alternative close window binding
"$mod, P, pseudo," # Toggles pseudotiling on a window
# Resize the current split
"$mod, +, layoutmsg, splitratio, +0.05"
"$mod, -, layoutmsg, splitratio, -0.05"
# Toggle the next split direction manually if you want
"$mod, J, layoutmsg, orientationnext"
# Moving focus
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
# Moving windows
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, down, movewindow, d"
# Workspace Management
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
# Move active window to a workspace
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
# Scroll through existing workspaces
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
# Exit Hyprland session
"$mod SHIFT, E, exit,"
];
# Mouse bindings
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
programs.waybar = {
enable = true;
style = ''
* {
border: none;
font-family: "JetBrainsMono Nerd Font";
font-size: 14px;
min-height: 0;
}
window#waybar {
background-color: rgba(26, 27, 38, 0.8);
color: #c0caf5;
}
#workspaces, #clock, #pulseaudio, #network, #battery, #custom-power {
padding: 0 5px;
margin: 0 3px;
}
#workspaces button.active {
background-color: #7aa2f7;
color: #1a1b26;
border-radius: 5px;
}
#pulseaudio:hover, #network:hover, #battery:hover, #custom-power:hover {
background-color: #414868;
border-radius: 5px;
}
#battery.charging, #battery.plugged {
color: #9ece6a; /* Green for charging */
}
#battery.critical:not(.charging) {
color: #f7768e; /* Red for critical */
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink {
to {
background-color: #f7768e;
color: #1a1b26;
}
}
'';
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [ "network" "battery" "pulseaudio" "custom/power" ]; # This reference is correct
"hyprland/workspaces" = {
format = "{icon}";
format-icons = { "default" = ""; };
};
"clock" = {
format = "{:%H:%M }";
};
# --- NEW WIFI MODULE ---
"network" = {
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ifname} ";
format-disconnected = "Disconnected ";
tooltip-format-wifi = "Signal: {signalStrength}% at {frequency}MHz\nIP: {ipaddr}/{cidr}\nGateway: {gwaddr}";
};
# --- NEW BATTERY MODULE ---
"battery" = {
states = {
good = 95;
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% ";
format-plugged = "{capacity}% ";
format-icons = ["" "" "" "" "" "" "" "" "" ""];
};
"pulseaudio" = {
format = "{volume}% {icon}";
format-icons.default = ["" "" ""];
"on-click" = "pavucontrol";
};
"custom/power" = {
format = "";
tooltip = false;
"on-click" = "rofi-power-menu";
};
};
};
};
}