This commit is contained in:
mjallen18
2025-11-12 20:01:54 -06:00
parent b42d9eff71
commit c2766e82af
4 changed files with 20 additions and 60 deletions

View File

@@ -4,19 +4,6 @@ let
cfg = config.mjallen.programs.waybar;
palette = import cfg.theme.file;
# Back-compat shims for deprecated options
rightModules =
if builtins.hasAttr "modules-right" cfg && (cfg."modules-right" != [ ]) then
cfg."modules-right"
else
cfg.layout.right;
netIf =
if (cfg ? networkInterface) && (cfg.networkInterface != "wlan0") then
cfg.networkInterface
else
cfg.network.interface;
defaultOpacity = palette.tokens.opacity or "opacity: 0.85;";
defaultBorderRadius = palette.tokens.borderRadius or "border-radius: 1rem;";
defaultCenterOptions =
@@ -317,7 +304,7 @@ in
enable = true;
systemd.enable = true;
settings = ({
settings = {
mainBar = (
(mkMerge [
{
@@ -332,7 +319,7 @@ in
# Module Layout
modules-left = cfg.layout.left;
modules-center = cfg.layout.center;
modules-right = rightModules;
modules-right = cfg.layout.right;
# Base module definitions always present unless individually gated
"hyprland/workspaces" = {
@@ -365,7 +352,7 @@ in
};
network = {
interface = netIf;
interface = cfg.network.interface;
on-click = "nm-connection-editor";
format = "{icon}";
tooltip-format = "{ifname} via {gwaddr} 󰊗";
@@ -589,7 +576,7 @@ in
])
// cfg.extra.settings
);
})
}
// cfg.extraModules; # keep legacy top-level extra modules for compatibility
style = baseStyle + (cfg.extra.style or "") + (cfg.extraModulesStyle or "");

View File

@@ -23,18 +23,6 @@ in
description = "Waybar layer (compat). Prefer layout + feature flags.";
};
modules-right = mkOption {
type = listOf str;
default = [ ];
description = "DEPRECATED: use layout.right.";
};
networkInterface = mkOption {
type = str;
default = "wlan0";
description = "DEPRECATED: use network.interface.";
};
extraModules = mkOption {
type = attrs;
default = { };
@@ -132,6 +120,11 @@ in
cpu = mkOption {
type = submodule {
options = {
enable = mkOption {
type = bool;
default = true;
description = "Enable CPU temperature module.";
};
hwmonPath = mkOption {
type = str;
default = "/sys/class/hwmon/hwmon4/temp1_input";