More niri styling

This commit is contained in:
Timo Boomers 2025-06-23 17:04:59 +02:00
parent 849bd2a5e0
commit 64f21a317b
Signed by: xeovalyte
SSH Key Fingerprint: SHA256:GWI1hq+MNKR2UOcvk7n9tekASXT8vyazK7vDF9Xyciw
6 changed files with 106 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -18,6 +18,8 @@ in {
imports = [
inputs.niri.homeModules.niri
./waybar.nix
./mako.nix
./swww.nix
];
config = mkIf cfg.enable {
@ -70,8 +72,11 @@ in {
programs.niri.settings.spawn-at-startup = [
{ command = ["vesktop"]; }
{ command = ["thunderbird"]; }
{ command = ["xwayland-satellite" ":10"]; }
];
programs.niri.settings.environment.DISPLAY = ":10";
programs.niri.settings.window-rules = [
{
matches = [
@ -82,6 +87,16 @@ in {
}
];
# Configure overview
programs.niri.settings.layer-rules = [
{
matches = [
{ namespace = "wallpaper"; }
];
place-within-backdrop = true;
}
];
programs.niri.settings.binds = with config.lib.niri.actions; {
"Mod+Shift+Slash".action = show-hotkey-overlay;

View File

@ -0,0 +1,21 @@
{ config, pkgs, lib, inputs, ... }:
with lib;
let
cfg = config.settings.desktop-environments.niri.mako;
in {
options = {
settings.desktop-environments.niri.mako.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable mako notifiaction deamon
'';
default = config.settings.desktop-environments.niri.enable;
};
};
config = mkIf cfg.enable {
services.mako.enable = true;
};
}

View File

@ -0,0 +1,56 @@
{ config, pkgs, lib, inputs, ... }:
with lib;
let
cfg = config.settings.desktop-environments.niri.swww;
in {
options = {
settings.desktop-environments.niri.swww.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable swww wallpapers deamon
'';
default = config.settings.desktop-environments.niri.enable;
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
swww
swaybg
];
systemd.user.services.swaybg = {
Unit = {
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
Requisite = [ "graphical-session.target" ];
Description = "Enable swaybg wallpaper management";
};
Install = {
WantedBy = [ "niri.service"];
};
Service = {
ExecStart = ''${pkgs.swaybg}/bin/swaybg -m fill -i "%h/nix/assets/wallpaper-2-blurred.png"'';
Restart = ''on-failure'';
};
};
systemd.user.services.swww = {
Unit = {
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
Requisite = [ "graphical-session.target" ];
Description = "Enable swww wallpaper management";
};
Install = {
WantedBy = [ "niri.service"];
};
Service = {
ExecStart = ''${pkgs.swww}/bin/swww-daemon'';
Restart = ''on-failure'';
};
};
};
}

View File

@ -61,6 +61,10 @@ in {
padding: 0 5px;
}
window#waybar {
background: rgba(0,0,0,0.4);
}
#workspaces button.active {
border-bottom: 2px solid @base05;
}

View File

@ -42,7 +42,16 @@ in {
stylix.base16Scheme = lib.mkIf (cfg.theme != "theme") "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
stylix.autoEnable = true;
# stylix.opacity.terminal = 0.9;
stylix.fonts.monospace = {
package = pkgs.nerd-fonts.dejavu-sans-mono;
name = "DejaVuSansM Nerd Font Mono";
};
# stylix.fonts.monospace = {
# package = pkgs.dejavu_fonts;
# name = "DejaVu Sans Mono";
# };
stylix.cursor = {
package = pkgs.phinger-cursors;