diff --git a/home/programs/niri/default.nix b/home/programs/niri/default.nix index ece5afd..63dcbb2 100644 --- a/home/programs/niri/default.nix +++ b/home/programs/niri/default.nix @@ -1,18 +1,34 @@ { inputs, - config, - pkgs, + nixosConfig, ... }: let - schemeData = inputs.basix.schemeData.base16.${config.theme.scheme}; + colors = inputs.basix.schemeData.base16.${nixosConfig.style.scheme}.palette; in { imports = [./binds.nix]; programs.niri = { settings = { - environment."NIXOS_OZONE_WL" = "1"; + environment = { + "NIXOS_OZONE_WL" = "1"; + "DISPLAY" = ":0"; + "_JAVA_AWT_WM_NONREPARENTING" = "1"; # https://wiki.archlinux.org/title/Sway#Java_applications + }; + prefer-no-csd = true; window-rules = [ + { + draw-border-with-background = false; + geometry-corner-radius = let + r = 8.0; + in { + top-left = r; + top-right = r; + bottom-left = r; + bottom-right = r; + }; + clip-to-geometry = true; + } { matches = [ {app-id = "foot";} @@ -21,13 +37,21 @@ in { } ]; - layout = { - border.active = pkgs.lib.rgba schemeData.palette.base0E; - }; input.keyboard.xkb = { layout = "us"; options = "compose:ralt"; }; + + layout = { + focus-ring = { + enable = true; + active.color = "#${colors.base0E}"; + }; + + center-focused-column = "always"; + always-center-single-column = true; + }; + spawn-at-startup = [{command = ["xwayland-satellite"];}]; }; }; } diff --git a/lib/default.nix b/lib/default.nix index c9f30a3..09d44fd 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -3,7 +3,7 @@ lib, ... }: let - # convert rrggbb hex to rgba(r, g, b, a) CSS format + # convert rrggbb hex to rgba(r, g, b, a) rgba = c: let r = toString (hexToDec (builtins.substring 0 2 c)); g = toString (hexToDec (builtins.substring 2 2 c)); diff --git a/system/programs/niri/default.nix b/system/programs/niri/default.nix index 9dee14e..6f8bb7b 100644 --- a/system/programs/niri/default.nix +++ b/system/programs/niri/default.nix @@ -27,4 +27,6 @@ session required pam_env.so conffile=/etc/pam/environment readenv=0 session required pam_unix.so ''; + + environment.systemPackages = [pkgs.xwayland-satellite]; }