feature(niri): Init module

This commit is contained in:
DashieTM 2025-10-05 13:24:30 +02:00
parent 9be8a82a29
commit 1857504bac
13 changed files with 1446 additions and 254 deletions

View file

@ -1,5 +1,4 @@
{
mkDashDefault,
lib,
config,
pkgs,
@ -7,7 +6,7 @@
options,
...
}: let
username = config.conf.username;
inherit (config.conf) username;
base16 = pkgs.callPackage inputs.base16.lib {};
scheme = base16.mkSchemeAttrs config.stylix.base16Scheme;
ironbarDefaultConfig = useBatteryModule: {
@ -183,8 +182,15 @@
];
};
monitorConfig = useBatteryModule:
if config.mods.hypr.hyprland.ironbarSingleMonitor
then {monitors.${config.mods.hypr.hyprland.defaultMonitor} = ironbarDefaultConfig useBatteryModule;}
if config.mods.ironbar.ironbarSingleMonitor
then {
monitors.${
if config.mods.wm.monitors != []
then (builtins.elemAt config.mods.wm.monitors 0).name
else ""
} =
ironbarDefaultConfig useBatteryModule;
}
else ironbarDefaultConfig useBatteryModule;
in {
options.mods = {
@ -195,6 +201,14 @@ in {
type = lib.types.bool;
description = "Enables ironbar";
};
ironbarSingleMonitor = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = ''
Whether to use ironbar on a single monitor.
'';
};
useDefaultConfig = lib.mkOption {
default = true;
example = false;
@ -257,6 +271,7 @@ in {
@import url("/home/${username}/.config/gtk-3.0/gtk.css");
@define-color primary #${scheme.base0D};
@define-color warning #${scheme.base0F};
@define-color muted-text #${scheme.base05};
@define-color background #${scheme.base00};
@define-color secondary-background #${scheme.base02};
@ -406,6 +421,10 @@ in {
color: @primary;
}
.workspaces .item:not(.visible) {
color: @warning;
}
.workspaces .item.focused {
background-color: @primary;
color: @background;