feat: fixed(?) binds and window-rules modules

This commit is contained in:
serenity-F 2026-09-22 00:44:20 +10:00
parent e540b21ed9
commit e7320119cd
No known key found for this signature in database
2 changed files with 104 additions and 103 deletions

View file

@ -1,70 +1,77 @@
{ self, inputs, ... }:
let
{
windowRules = [
{
geometry-corner-radius =
let
radius = 16.0;
in
# niri window rules module declaration
flake.nixosModules.niri-window-rules =
{ pkgs, ... }:
let
windowRules = [
{
bottom-left = radius;
bottom-right = radius;
top-left = radius;
top-right = radius;
};
clip-to-geometry = true;
draw-border-with-background = false;
}
{
matches = [ { app-id = "kitty"; } ];
opacity = 0.95;
}
{
matches = [ { is-floating = true; } ];
default-floating-position = {
relative-to = "top-left";
x = 1720;
y = 720;
};
max-height = 720;
max-width = 1720;
opacity = 0.95;
shadow.enable = true;
}
{
matches = [
geometry-corner-radius =
let
radius = 16.0;
in
{
bottom-left = radius;
bottom-right = radius;
top-left = radius;
top-right = radius;
};
clip-to-geometry = true;
draw-border-with-background = false;
}
{
at-startup = true;
title = "btop";
matches = [ { app-id = "kitty"; } ];
opacity = 0.95;
}
{
matches = [ { is-floating = true; } ];
default-floating-position = {
relative-to = "top-left";
x = 1720;
y = 720;
};
max-height = 720;
max-width = 1720;
opacity = 0.95;
shadow.enable = true;
}
{
matches = [
{
at-startup = true;
title = "btop";
}
];
open-on-output = "DP-4";
open-on-workspace = "System";
open-maximized = true;
}
{
matches = [ { title = "calculator"; } ];
open-floating = true;
open-focused = true;
}
];
open-on-output = "DP-4";
open-on-workspace = "System";
open-maximized = true;
}
in
{
matches = [ { title = "calculator"; } ];
open-floating = true;
open-focused = true;
}
];
in
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
{
flake.nixosModules.niri-window-rules = { pkgs, ... }: {
# for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager.users.serenity = {
programs.niri.settings = {
# using the home manager module to assign binds
home-manager.users.serenity.programs.niri.settings = {
# grabs assigned rules from let bindings above
window-rules = windowRules;
layout = {
background-color = "transparent";
};
# pushes wallpaper set by noctalia to the lowest layer
layer-rules = [
{
matches = [ { namespace = "^noctalia-wallpaper*"; } ];
@ -73,5 +80,4 @@ in
];
};
};
};
}