More niri styling

This commit is contained in:
2025-06-23 17:04:59 +02:00
parent 849bd2a5e0
commit 64f21a317b
6 changed files with 106 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ in {
imports = [
inputs.niri.homeModules.niri
./waybar.nix
./mako.nix
./swww.nix
];
config = mkIf cfg.enable {
@@ -70,7 +72,10 @@ 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 = [
{
@@ -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;
}