summaryrefslogtreecommitdiff
path: root/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'accounts')
-rw-r--r--accounts/gkleen@sif/niri/default.nix33
1 files changed, 27 insertions, 6 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
index 50f8ba44..8b95f00f 100644
--- a/accounts/gkleen@sif/niri/default.nix
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -417,7 +417,7 @@ in {
417 (leaf "position" { x = 2560; y = 0; }) 417 (leaf "position" { x = 2560; y = 0; })
418 ]) 418 ])
419 (node "output" "HP Inc. HP 727pu CN4417143K" [ 419 (node "output" "HP Inc. HP 727pu CN4417143K" [
420 (leaf "mode" "2560x1440@120") # 119.998 420 (leaf "mode" "2560x1440@119.998")
421 (leaf "scale" 1) 421 (leaf "scale" 1)
422 (leaf "position" { x = 2560; y = 0; }) 422 (leaf "position" { x = 2560; y = 0; })
423 (flag "variable-refresh-rate") 423 (flag "variable-refresh-rate")
@@ -440,7 +440,7 @@ in {
440 (leaf "top" 0) 440 (leaf "top" 0)
441 (leaf "bottom" 0) 441 (leaf "bottom" 0)
442 ]) 442 ])
443 (plain "focus-ring" [ 443 (plain "border" [
444 (leaf "width" 2) 444 (leaf "width" 2)
445 (leaf "active-gradient" { 445 (leaf "active-gradient" {
446 from = "hsla(195 100% 45% 1)"; 446 from = "hsla(195 100% 45% 1)";
@@ -455,9 +455,12 @@ in {
455 relative-to = "workspace-view"; 455 relative-to = "workspace-view";
456 }) 456 })
457 ]) 457 ])
458 (plain "focus-ring" [
459 (flag "off")
460 ])
458 461
459 (plain "preset-column-widths" (map (prop: leaf "proportion" prop) [ 462 (plain "preset-column-widths" (map (prop: leaf "proportion" prop) [
460 (1. / 4.) (1. / 3.) (1. / 2.) (2. / 3.) (3. / 4.) 463 (1. / 4.) (1. / 3.) (1. / 2.) (2. / 3.) (3. / 4.) (1.)
461 ])) 464 ]))
462 (plain "default-column-width" [ (leaf "proportion" (1. / 2.)) ]) 465 (plain "default-column-width" [ (leaf "proportion" (1. / 2.)) ])
463 (plain "preset-window-heights" (map (prop: leaf "proportion" prop) [ 466 (plain "preset-window-heights" (map (prop: leaf "proportion" prop) [
@@ -467,8 +470,10 @@ in {
467 (flag "always-center-single-column") 470 (flag "always-center-single-column")
468 471
469 (plain "tab-indicator" [ 472 (plain "tab-indicator" [
470 (leaf "gap" (-6)) 473 (leaf "gap" 4)
471 (leaf "width" 6) 474 (leaf "width" 8)
475 (leaf "gaps-between-tabs" 4)
476 (flag "place-within-column")
472 (leaf "length" { total-proportion = 1.; }) 477 (leaf "length" { total-proportion = 1.; })
473 (leaf "active-gradient" { 478 (leaf "active-gradient" {
474 from = "hsla(195 100% 60% 0.75)"; 479 from = "hsla(195 100% 60% 0.75)";
@@ -499,9 +504,13 @@ in {
499 ) ["comm" "web" "vid" "bmr"]) 504 ) ["comm" "web" "vid" "bmr"])
500 505
501 (plain "window-rule" [ 506 (plain "window-rule" [
507 (leaf "clip-to-geometry" true)
508 ])
509
510 (plain "window-rule" [
502 (leaf "match" { is-floating = true; }) 511 (leaf "match" { is-floating = true; })
503 (leaf "geometry-corner-radius" 8) 512 (leaf "geometry-corner-radius" 8)
504 (leaf "clip-to-geometry" true) 513 (plain "shadow" [ (flag "on") ])
505 ]) 514 ])
506 515
507 (plain "window-rule" [ 516 (plain "window-rule" [
@@ -626,6 +635,7 @@ in {
626 exec -- kitty --app-id kitty-play --directory "$HOME"/media mpv "$(wl-paste)" 635 exec -- kitty --app-id kitty-play --directory "$HOME"/media mpv "$(wl-paste)"
627 ''; 636 '';
628 })); 637 }));
638 "Mod+Alt+M".action = spawn (lib.getExe' pkgs.screen-message "sm") "-n" "Fira Mono" "-a" "1" "-f" "#fff" "-b" "#000";
629 639
630 "Mod+U".action = spawn (lib.getExe (pkgs.writeShellApplication { 640 "Mod+U".action = spawn (lib.getExe (pkgs.writeShellApplication {
631 name = "qalc-fuzzel"; 641 name = "qalc-fuzzel";
@@ -810,6 +820,17 @@ in {
810 "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all"; 820 "Mod+Shift+Semicolon".action = spawn makoctl "dismiss" "--all";
811 "Mod+Period".action = spawn makoctl "menu" (lib.getExe config.programs.fuzzel.package) "--dmenu"; 821 "Mod+Period".action = spawn makoctl "menu" (lib.getExe config.programs.fuzzel.package) "--dmenu";
812 "Mod+Comma".action = spawn makoctl "restore"; 822 "Mod+Comma".action = spawn makoctl "restore";
823
824 "Mod+Control+W".action = spawn (lib.getExe (pkgs.writeShellApplication {
825 name = "focus-empty-unnamed-workspace";
826 runtimeInputs = [ niri pkgs.gojq pkgs.socat ];
827 text = ''
828 workspaces_json="$(niri msg -j workspaces)"
829 active_output="$(jq '.[] | select(.is_focused) | .output' <<<"$workspaces_json")"
830 target_workspace_id="$(jq --argjson active_output "$active_output" 'map(select(.active_window_id == null and .name == null and .output == $active_output)) | sort_by(.idx) | .[0].id' <<<"$workspaces_json")"
831 jq --argjson workspace_id "$target_workspace_id" -nc '{"Action":{"FocusWorkspace":{"reference":{"Id": $workspace_id}}}}' | tee /dev/stderr | socat STDIO "$NIRI_SOCKET"
832 '';
833 }));
813 })) 834 }))
814 (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces) 835 (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces)
815 ] 836 ]