diff --git a/options/custom/desktops/niri/binds.nix b/options/custom/desktops/niri/binds.nix index da48006..42175e4 100644 --- a/options/custom/desktops/niri/binds.nix +++ b/options/custom/desktops/niri/binds.nix @@ -44,6 +44,7 @@ in { home-manager.sharedModules = [ { # https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsbinds #?? Mod = Super/Win, Alt when nested; Mod5 = AltGr #?? wev programs.niri.settings.binds = let diff --git a/options/custom/desktops/niri/default.nix b/options/custom/desktops/niri/default.nix index 5ad2b9a..70e6b93 100644 --- a/options/custom/desktops/niri/default.nix +++ b/options/custom/desktops/niri/default.nix @@ -41,7 +41,6 @@ in { # https://github.com/YaLTeR/niri # https://github.com/sodiboo/niri-flake - # https://github.com/sodiboo/niri-flake/blob/main/docs.md programs.niri = { enable = true; #// package = pkgs.niri; # nixpkgs @@ -50,7 +49,7 @@ in { nixpkgs.overlays = [inputs.niri-flake.overlays.niri]; - #!! Disable bundled KDE polkit agent by default + # Disable bundled KDE polkit agent by default # https://github.com/sodiboo/niri-flake?tab=readme-ov-file#additional-notes systemd.user.services.niri-flake-polkit.enable = cfg.polkit; diff --git a/options/custom/desktops/niri/input.nix b/options/custom/desktops/niri/input.nix index e5d5543..2d5846e 100644 --- a/options/custom/desktops/niri/input.nix +++ b/options/custom/desktops/niri/input.nix @@ -15,16 +15,19 @@ in { { # https://github.com/YaLTeR/niri/wiki/Configuration:-Input programs.niri.settings.input = { - # https://github.com/YaLTeR/niri/wiki/Configuration:-Input#general-settings + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputfocus-follows-mouseenable focus-follows-mouse = { enable = true; max-scroll-amount = "100%"; }; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputpower-key-handlingenable power-key-handling.enable = false; + + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputworkspace-auto-back-and-forth workspace-auto-back-and-forth = true; - # https://github.com/YaLTeR/niri/wiki/Configuration:-Input#keyboard + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputkeyboardrepeat-delay keyboard = { repeat-delay = 300; repeat-rate = 40; @@ -32,12 +35,13 @@ in { # BUG: Applies to trackball device, switch to "flat" when per-device configuration is supported # https://github.com/YaLTeR/niri/issues/371 - # https://github.com/YaLTeR/niri/wiki/Configuration:-Input#pointing-devices + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputmouseaccel-profile mouse = { accel-profile = "adaptive"; accel-speed = -0.2; }; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputtouchpadaccel-profile touchpad = { accel-profile = "adaptive"; accel-speed = 0.3; @@ -47,6 +51,7 @@ in { scroll-factor = 0.4; }; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputtrackballaccel-profile trackball = { accel-profile = "adaptive"; accel-speed = 0.5; diff --git a/options/custom/desktops/niri/layout.nix b/options/custom/desktops/niri/layout.nix index a3723cf..cfb643d 100644 --- a/options/custom/desktops/niri/layout.nix +++ b/options/custom/desktops/niri/layout.nix @@ -17,8 +17,10 @@ in { programs.niri.settings.layout = let gap = config.custom.gap / 2; in { + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutalways-center-single-column always-center-single-column = true; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutborder border = { enable = true; width = config.custom.border; @@ -26,33 +28,39 @@ in { inactive.color = "#00000000"; }; - #/// center-focused-column = mkIf config.custom.ultrawide "always"; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutcenter-focused-column + #// center-focused-column = mkIf config.custom.ultrawide "always"; + + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutdefault-column-width default-column-width.proportion = 1.0 / 3.0; # 33% # TODO: Uncomment after next release > v1.10.1 - # https://github.com/YaLTeR/niri/wiki/Configuration:-Layout#empty-workspace-above-first #// empty-workspace-above-first = true; focus-ring.enable = false; gaps = gap; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutinsert-hint insert-hint = { enable = true; display.color = "#d3368280"; }; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutpreset-column-widths preset-column-widths = [ {proportion = 1.0 / 3.0;} # 33%, default {proportion = 2.0 / 3.0;} # 66% {proportion = 3.0 / 3.0;} # 100% ]; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutpreset-window-heights preset-window-heights = [ {proportion = 2.0 / 3.0;} # 66% {proportion = 1.0 / 3.0;} # 33% {proportion = 3.0 / 3.0;} # 100%, default ]; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutstruts struts = { left = gap; right = gap; diff --git a/options/custom/desktops/niri/misc.nix b/options/custom/desktops/niri/misc.nix index 439b392..8e80b93 100644 --- a/options/custom/desktops/niri/misc.nix +++ b/options/custom/desktops/niri/misc.nix @@ -22,8 +22,9 @@ in { config = mkIf cfg.enable { home-manager.sharedModules = [ { + # https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous programs.niri.settings = { - # https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingscursorhide-after-inactive-ms cursor = with hm.gtk.cursorTheme; { # Inherit home-manager GTK settings inherit size; @@ -35,13 +36,18 @@ in { # HACK: Inherit home-manager environment variables in lieu of upstream fix # https://github.com/nix-community/home-manager/issues/2659 + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsenvironment environment = mapAttrs (name: value: toString value) hm.home.sessionVariables; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingshotkey-overlayskip-at-startup hotkey-overlay.skip-at-startup = true; + + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsprefer-no-csd prefer-no-csd = true; #!! Not executed in a shell # https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings#spawn + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsspawn-at-startup spawn-at-startup = let home = hm.home.homeDirectory; in @@ -55,6 +61,7 @@ in { {command = [wallpaper];} ]; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsswitch-eventslid-close switch-events = { # Turn display off while inhibiting suspend lid-close.action.spawn = [niri "msg" "action" "power-off-monitors"]; diff --git a/options/custom/desktops/niri/output.nix b/options/custom/desktops/niri/output.nix index d3b0565..772cc96 100644 --- a/options/custom/desktops/niri/output.nix +++ b/options/custom/desktops/niri/output.nix @@ -15,6 +15,7 @@ in { home-manager.sharedModules = [ { # https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsoutputs #?? niri msg outputs programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: { name = connector; diff --git a/options/custom/desktops/niri/rules.nix b/options/custom/desktops/niri/rules.nix index cc419ff..d10ffd8 100644 --- a/options/custom/desktops/niri/rules.nix +++ b/options/custom/desktops/niri/rules.nix @@ -16,6 +16,7 @@ in { # https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules programs.niri.settings = { # HACK: Name workspaces after index to use open-on-workspace rule + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsworkspaces #?? niri msg workspaces # workspaces = { # "1" = {}; @@ -23,10 +24,10 @@ in { # "3" = {}; # }; + # https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingswindow-rules #?? niri msg windows window-rules = [ ### Defaults - { # Global geometry-corner-radius = let