diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-11 13:24:41 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-11 13:24:41 +0200 |
commit | 72cbaf459cfbc37f551bb0218cf6086105eb0da0 (patch) | |
tree | d802fe3cad7bf9333c1de759c96aad36326b1723 /accounts/gkleen@sif | |
parent | 5786716a383254c256f109d38fda1c898456fb60 (diff) | |
download | nixos-72cbaf459cfbc37f551bb0218cf6086105eb0da0.tar nixos-72cbaf459cfbc37f551bb0218cf6086105eb0da0.tar.gz nixos-72cbaf459cfbc37f551bb0218cf6086105eb0da0.tar.bz2 nixos-72cbaf459cfbc37f551bb0218cf6086105eb0da0.tar.xz nixos-72cbaf459cfbc37f551bb0218cf6086105eb0da0.zip |
...
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 143 | ||||
-rw-r--r-- | accounts/gkleen@sif/hyprland.nix | 34 |
2 files changed, 132 insertions, 45 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 5c90808c..09d0f4fa 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -76,6 +76,14 @@ let | |||
76 | }) | 76 | }) |
77 | ]; | 77 | ]; |
78 | }; | 78 | }; |
79 | |||
80 | nvidiaOffloadScript = pkgs.writeShellScriptBin "nvidia-offload" '' | ||
81 | export __NV_PRIME_RENDER_OFFLOAD=1 | ||
82 | export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 | ||
83 | export __GLX_VENDOR_LIBRARY_NAME=nvidia | ||
84 | export __VK_LAYER_NV_optimus=NVIDIA_only | ||
85 | exec -a "$1" "$@" | ||
86 | ''; | ||
79 | in { | 87 | in { |
80 | imports = with flake.nixosModules.userProfiles.${userName}; [ | 88 | imports = with flake.nixosModules.userProfiles.${userName}; [ |
81 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) | 89 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) |
@@ -279,46 +287,98 @@ in { | |||
279 | enable = true; | 287 | enable = true; |
280 | target = "hyprland-session.target"; | 288 | target = "hyprland-session.target"; |
281 | }; | 289 | }; |
282 | settings.mainBar = { | 290 | settings = let |
283 | layer = "top"; | 291 | windowRewrites = { |
284 | position = "top"; | 292 | "(.*) — Mozilla Firefox" = "$1"; |
285 | height = 14; | 293 | "(.*) - mpv" = "$1"; |
286 | output = [ "eDP-1" ]; | ||
287 | modules-left = [ "hyprland/workspaces" ]; | ||
288 | modules-center = [ "hyprland/window" ]; | ||
289 | modules-right = [ "clock" "tray" "battery" ]; | ||
290 | |||
291 | clock = { | ||
292 | interval = 1; | ||
293 | timezone = "Europe/Berlin"; | ||
294 | format = "W{:%V-%u %F %H:%M:%S%Ez}"; | ||
295 | tooltip-format = "<tt><small>{calendar}</small></tt>"; | ||
296 | calendar = { | ||
297 | mode = "year"; | ||
298 | mode-mon-col = 3; | ||
299 | week-pos = "right"; | ||
300 | on-scroll = 1; | ||
301 | format = { | ||
302 | months = "<span color='#ffead3'><b>{}</b></span>"; | ||
303 | days = "<span color='#ecc6d9'><b>{}</b></span>"; | ||
304 | weeks = "<span color='#99ffdd'><b>W{}</b></span>"; | ||
305 | weekdays = "<span color='#ffcc66'><b>{}</b></span>"; | ||
306 | today = "<span color='#ff6699'><b><u>{}</u></b></span>"; | ||
307 | }; | ||
308 | }; | ||
309 | }; | 294 | }; |
310 | battery = { | 295 | iconSize = 14; |
311 | format = "{icon}"; | 296 | in [ |
312 | format-icons = ["" "" "" "" ""]; | 297 | { |
313 | tooltip-format = "{capacity}% {timeTo}"; | 298 | layer = "top"; |
314 | }; | 299 | position = "top"; |
315 | icon = { | 300 | height = 14; |
316 | icon-size = 12; | 301 | output = "eDP-1"; |
317 | show-passive-items = true; | 302 | modules-left = [ "hyprland/workspaces" ]; |
318 | spacing = 2; | 303 | modules-center = [ "hyprland/window" ]; |
319 | }; | 304 | modules-right = [ "privacy" "clock" "tray" "battery" ]; |
320 | }; | 305 | |
306 | "hyprland/workspaces" = { | ||
307 | all-outputs = true; | ||
308 | }; | ||
309 | "hyprland/window" = { | ||
310 | separate-outputs = true; | ||
311 | icon = true; | ||
312 | icon-size = iconSize; | ||
313 | rewrite = windowRewrites; | ||
314 | }; | ||
315 | clock = { | ||
316 | interval = 1; | ||
317 | timezone = "Europe/Berlin"; | ||
318 | format = "W{:%V-%u %F %H:%M:%S%Ez}"; | ||
319 | tooltip-format = "<tt><small>{calendar}</small></tt>"; | ||
320 | calendar = { | ||
321 | mode = "year"; | ||
322 | mode-mon-col = 3; | ||
323 | weeks-pos = "left"; | ||
324 | on-scroll = 1; | ||
325 | format = { | ||
326 | months = "<span color='#ffead3'><b>{}</b></span>"; | ||
327 | days = "<span color='#ecc6d9'><b>{}</b></span>"; | ||
328 | weeks = "<span color='#99ffdd'><b>{}</b></span>"; | ||
329 | weekdays = "<span color='#ffcc66'><b>{}</b></span>"; | ||
330 | today = "<span color='#ff6699'><b>{}</b></span>"; | ||
331 | }; | ||
332 | }; | ||
333 | }; | ||
334 | battery = { | ||
335 | format = "{icon}"; | ||
336 | format-icons = ["" "" "" "" ""]; | ||
337 | tooltip-format = "{capacity}% {timeTo}"; | ||
338 | }; | ||
339 | tray = { | ||
340 | icon-size = iconSize; | ||
341 | # show-passive-items = true; | ||
342 | spacing = 2; | ||
343 | }; | ||
344 | privacy = { | ||
345 | icon-spacing = 2; | ||
346 | icon-size = iconSize; | ||
347 | modules = [ { type = "screenshare"; } { type = "audio-in"; } ]; | ||
348 | }; | ||
349 | } | ||
350 | { | ||
351 | layer = "top"; | ||
352 | position = "top"; | ||
353 | height = 14; | ||
354 | output = "!eDP-1"; | ||
355 | modules-left = [ "hyprland/workspaces" ]; | ||
356 | modules-center = [ "hyprland/window" ]; | ||
357 | modules-right = [ "clock" ]; | ||
358 | |||
359 | "hyprland/workspaces" = { | ||
360 | all-outputs = false; | ||
361 | }; | ||
362 | "hyprland/window" = { | ||
363 | separate-outputs = true; | ||
364 | icon = true; | ||
365 | icon-size = iconSize; | ||
366 | rewrite = windowRewrites; | ||
367 | }; | ||
368 | clock = { | ||
369 | interval = 1; | ||
370 | timezone = "Europe/Berlin"; | ||
371 | format = "{:%H:%M}"; | ||
372 | tooltip-format = "W{:%V-%u %F %H:%M:%S%Ez}"; | ||
373 | }; | ||
374 | } | ||
375 | ]; | ||
321 | style = '' | 376 | style = '' |
377 | @define-color white #dddddd; | ||
378 | @define-color blue #1a8fff; | ||
379 | @define-color green #23fd00; | ||
380 | @define-color red #f2201f; | ||
381 | |||
322 | * { | 382 | * { |
323 | border: none; | 383 | border: none; |
324 | font-family: "Fira Sans"; | 384 | font-family: "Fira Sans"; |
@@ -328,7 +388,7 @@ in { | |||
328 | 388 | ||
329 | window#waybar { | 389 | window#waybar { |
330 | background-color: rgba(0, 0, 0, 0.5); | 390 | background-color: rgba(0, 0, 0, 0.5); |
331 | color: #ffffff; | 391 | color: @white; |
332 | } | 392 | } |
333 | 393 | ||
334 | label.module { | 394 | label.module { |
@@ -344,6 +404,9 @@ in { | |||
344 | #workspaces button.urgent { | 404 | #workspaces button.urgent { |
345 | color: @red; | 405 | color: @red; |
346 | } | 406 | } |
407 | #workspaces button.empty { | ||
408 | opacity: 0.5; | ||
409 | } | ||
347 | ''; | 410 | ''; |
348 | }; | 411 | }; |
349 | wpaperd = { | 412 | wpaperd = { |
@@ -591,7 +654,7 @@ in { | |||
591 | matrix-synapse-tools.synadm wrappedRocketChatDesktop | 654 | matrix-synapse-tools.synadm wrappedRocketChatDesktop |
592 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs | 655 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs |
593 | sieve-connect gimp inkscape udiskie glab scrot nitrokey-app | 656 | sieve-connect gimp inkscape udiskie glab scrot nitrokey-app |
594 | pynitrokey gtklock wlrctl | 657 | pynitrokey gtklock wlrctl nvidiaOffloadScript |
595 | ]; | 658 | ]; |
596 | 659 | ||
597 | file = { | 660 | file = { |
diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix index 9b20f89e..927e1639 100644 --- a/accounts/gkleen@sif/hyprland.nix +++ b/accounts/gkleen@sif/hyprland.nix | |||
@@ -53,6 +53,9 @@ | |||
53 | passes = 1; | 53 | passes = 1; |
54 | 54 | ||
55 | vibrancy = 0.1696; | 55 | vibrancy = 0.1696; |
56 | |||
57 | special = true; | ||
58 | popups = true; | ||
56 | }; | 59 | }; |
57 | }; | 60 | }; |
58 | 61 | ||
@@ -122,11 +125,11 @@ | |||
122 | "$mainMod" = "SUPER"; | 125 | "$mainMod" = "SUPER"; |
123 | 126 | ||
124 | bind = [ | 127 | bind = [ |
125 | "$mainMod, Q, exec, $terminal" | 128 | "$mainMod, return, exec, $terminal" |
126 | "$mainMod, C, killactive" | 129 | "$mainMod, Q, killactive" |
127 | "$mainMod, M, exit" | 130 | "$mainMod, M, exit" |
128 | "$mainMod, V, togglefloating" | 131 | "$mainMod, V, togglefloating" |
129 | "$mainMod, R, exec, $menu" | 132 | "$mainMod, D, exec, $menu" |
130 | "$mainMod, P, pseudo," | 133 | "$mainMod, P, pseudo," |
131 | "$mainMod, J, togglesplit," | 134 | "$mainMod, J, togglesplit," |
132 | 135 | ||
@@ -145,7 +148,15 @@ | |||
145 | 148 | ||
146 | "$mainMod, T, cyclenext" | 149 | "$mainMod, T, cyclenext" |
147 | 150 | ||
148 | "$mainMod SHIFT, N, movecurrentworkspacetomonitor, +1" | 151 | "$mainMod, G, focusmonitor, 0" |
152 | "$mainMod, C, focusmonitor, 1" | ||
153 | "$mainMod, R, focusmonitor, 2" | ||
154 | "$mainMod, L, focusmonitor, 3" | ||
155 | |||
156 | "$mainMod CTRL, G, movecurrentworkspacetomonitor, 0" | ||
157 | "$mainMod CTRL, C, movecurrentworkspacetomonitor, 1" | ||
158 | "$mainMod CTRL, R, movecurrentworkspacetomonitor, 2" | ||
159 | "$mainMod CTRL, L, movecurrentworkspacetomonitor, 3" | ||
149 | 160 | ||
150 | "$mainMod, F, fullscreen, 1" | 161 | "$mainMod, F, fullscreen, 1" |
151 | "$mainMod SHIFT, F, fullscreen, 0" | 162 | "$mainMod SHIFT, F, fullscreen, 0" |
@@ -207,9 +218,17 @@ | |||
207 | 218 | ||
208 | windowrulev2 = [ | 219 | windowrulev2 = [ |
209 | "suppressevent maximize, class:.*" | 220 | "suppressevent maximize, class:.*" |
210 | "maximize, class:^(Element|thunderbird)$" | 221 | |
222 | # "maximize, class:^(Element|thunderbird)$" | ||
211 | "workspace special:keepass, class:^org\.keepassxc\.KeePassXC$" | 223 | "workspace special:keepass, class:^org\.keepassxc\.KeePassXC$" |
212 | # "group set always lock invade, class:^Element$" | 224 | # "group set always lock invade, class:^Element$" |
225 | "workspace 4, class:^evince$" | ||
226 | "workspace 10, class:^mpv$" | ||
227 | "unset, class:^org\.keepassxc\.KeePassXC$, title:^KeePassXC - Access Request$" | ||
228 | "float, class:^org\.keepassxc\.KeePassXC$, title:^KeePassXC - Access Request$" | ||
229 | "center, class:^org\.keepassxc\.KeePassXC$, title:^KeePassXC - Access Request$" | ||
230 | |||
231 | "bordercolor rgba(ffee33ee) rgba(ff9500ee) 45deg, fullscreen:1" | ||
213 | ]; | 232 | ]; |
214 | 233 | ||
215 | workspace = [ | 234 | workspace = [ |
@@ -221,6 +240,11 @@ | |||
221 | "special:easyeffects, on-created-empty:easyeffects" | 240 | "special:easyeffects, on-created-empty:easyeffects" |
222 | "special:blueman, on-created-empty:blueman-manager" | 241 | "special:blueman, on-created-empty:blueman-manager" |
223 | "special:keepass, on-created-empty:keepassxc" | 242 | "special:keepass, on-created-empty:keepassxc" |
243 | |||
244 | "1, defaultName:comm" | ||
245 | "2, defaultName:web" | ||
246 | "3, defaultName:work" | ||
247 | "4, defaultName:read" | ||
224 | ]; | 248 | ]; |
225 | 249 | ||
226 | layerrule = [ | 250 | layerrule = [ |