{ config, lib, pkgs, osConfig, ... }: let cfg = config.hm.env.niri; in { options.hm.env.niri.enable = lib.mkEnableOption "niri hm"; config = lib.mkIf cfg.enable { hm.env = { awww.enable = true; fuzzel.enable = true; screenshot.enable = true; swayidle.enable = true; swaylock.enable = true; }; programs.niri.settings = { debug.disable-cursor-plane = [ ]; binds = import ./binds.nix { inherit config osConfig lib pkgs ; }; prefer-no-csd = true; hotkey-overlay.skip-at-startup = true; input = { mouse = { accel-profile = "flat"; accel-speed = -0.6; middle-emulation = true; scroll-factor = 1.5; }; focus-follows-mouse = { enable = true; max-scroll-amount = "10%"; }; mod-key = "Alt"; keyboard = { xkb.layout = "pl"; repeat-delay = 300; repeat-rate = 60; }; power-key-handling.enable = false; }; cursor = { hide-when-typing = true; size = 48; }; layout = { empty-workspace-above-first = true; border.enable = false; focus-ring = { enable = true; width = 3; active.color = "#7fc8ff"; inactive.color = "#505050"; }; preset-column-widths = [ { proportion = 1. / 3.; } { proportion = 1. / 2.; } { proportion = 2. / 3.; } ]; preset-window-heights = [ { proportion = 1. / 3.; } { proportion = 1. / 2.; } { proportion = 2. / 3.; } ]; default-column-width.proportion = 0.5; tab-indicator = { gaps-between-tabs = 3; position = "top"; }; }; window-rules = [ { matches = [ { app-id = "^otter-launcher$"; } ]; open-floating = true; default-column-width.fixed = 700; default-window-height.fixed = 450; default-floating-position = { relative-to = "top"; x = 0; y = 100; }; focus-ring.active.color = "#fab387"; } { matches = [ { app-id = "^Bitwarden$"; } { app-id = "^org\\.keepassxc\\.KeePassXC$"; } ]; block-out-from = "screen-capture"; } { matches = [ { app-id = "steam"; title = "^notificationtoasts_\\d+_desktop$"; } ]; default-floating-position = { x = 10; y = 10; relative-to = "bottom-right"; }; } { matches = [ { is-window-cast-target = true; } ]; focus-ring.active.color = "#f38ba8"; shadow = { enable = true; color = "#7d0d2d70"; }; } { matches = [ { app-id = "^qalculate-gtk$"; } ]; open-floating = true; # Use default-window-height instead of default-floating-height default-window-height.fixed = 537; default-column-width.fixed = 802; default-floating-position = { relative-to = "right"; x = 100; y = 0; }; } { matches = [ { app-id = "^sober$"; } ]; open-fullscreen = true; } ]; layer-rules = [ { matches = [ { namespace = "^notifications$"; } ]; block-out-from = "screencast"; } ]; gestures.hot-corners.enable = false; spawn-at-startup = [ { command = [ "obs" "--startreplaybuffer" ]; } ]; }; home.packages = with pkgs; [ qalculate-gtk gavin-bc ]; }; }