home/programs/niri: add xwayland-satellite, update layout settings, add colors

This commit is contained in:
Anthony Rodriguez 2024-10-08 13:33:25 +02:00
parent b5276c4523
commit e87a890bef
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
3 changed files with 34 additions and 8 deletions

View file

@ -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"];}];
};
};
}

View file

@ -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));

View file

@ -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];
}