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

@@ -101,19 +101,10 @@ in
layer = "bottom";
modules-right = [
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
"bluetooth"
"network"
"idle_inhibitor"
"clock"
"battery"
"custom/weather"
];
temperature = {
cpu.enable = true;
gpu.enable = true;
};
extraModules = {
"custom/lights" = {

View File

@@ -82,7 +82,7 @@ in
autostartCommands = [
"[silent] firefox"
"[silent] vesktop"
"[silent] discord"
"[silent] chromium --app=\"https://music.apple.com\""
"[silent] steam"
];
@@ -94,7 +94,7 @@ in
keybinds = {
bind = [
"$mod, A, exec, chromium --app=\"https://music.apple.com\""
"$mod, C, exec, vesktop"
"$mod, C, exec, discord"
"$mod, G, exec, steam"
];
};
@@ -128,22 +128,11 @@ in
layer = "bottom";
networkInterface = "wlp9s0";
modules-right = [
"custom/lights"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
"wireplumber#source"
"bluetooth"
"network"
"idle_inhibitor"
"clock"
"custom/weather"
];
network.interface = "wlp9s0";
temperature = {
cpu.enable = true;
gpu.enable = true;
};
extraModules = {
"custom/lights" = {

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";