theme edits
This commit is contained in:
@@ -1,69 +1,264 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (types) str int bool listOf attrs path nullOr submodule;
|
||||
in
|
||||
{
|
||||
options.mjallen.programs.waybar = {
|
||||
enable = mkEnableOption "enable waybar";
|
||||
enable = mkEnableOption "Waybar status bar";
|
||||
|
||||
# Legacy/compat options (kept for backwards compatibility)
|
||||
layer = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = "top";
|
||||
description = "Waybar layer (compat). Prefer layout + feature flags.";
|
||||
};
|
||||
|
||||
modules-right = mkOption {
|
||||
type = with types; listOf str;
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
description = "DEPRECATED: use layout.right.";
|
||||
};
|
||||
|
||||
networkInterface = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = "wlan0";
|
||||
description = "DEPRECATED: use network.interface.";
|
||||
};
|
||||
|
||||
extraModules = mkOption {
|
||||
type = types.attrs;
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Extra settings bars at top-level (compat with older module).";
|
||||
};
|
||||
|
||||
extraModulesStyle = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = "";
|
||||
description = "Extra CSS appended (compat). Prefer extra.style.";
|
||||
};
|
||||
|
||||
windowOffset = mkOption {
|
||||
type = types.int;
|
||||
type = int;
|
||||
default = 4;
|
||||
description = "Right margin offset for the hyprland/window module (in rem).";
|
||||
};
|
||||
|
||||
# Waybar modules config
|
||||
# modules = mkOption {
|
||||
# type = types.submodule {
|
||||
# options = {
|
||||
# # Modules
|
||||
# window = mkOption {
|
||||
# type = types.submodule {
|
||||
# options = {
|
||||
# # Waybar Module CSS
|
||||
# margin-right = mkOption {
|
||||
# type = types.str;
|
||||
# default = "4";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# temperature = mkOption {
|
||||
# type = types.submodule {
|
||||
# options = {
|
||||
# # Waybar Module CSS
|
||||
# margin-right = mkOption {
|
||||
# type = types.str;
|
||||
# default = "4";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# default = { };
|
||||
# };
|
||||
# Theme
|
||||
theme = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
file = mkOption {
|
||||
type = path;
|
||||
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
|
||||
description = "Nix file exporting a palette attrset (e.g., Nord).";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Theme configuration.";
|
||||
};
|
||||
|
||||
# Layout
|
||||
layout = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
left = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "hyprland/workspaces" ];
|
||||
description = "Modules shown on the left.";
|
||||
};
|
||||
center = mkOption {
|
||||
type = listOf str;
|
||||
default = [ "hyprland/window" ];
|
||||
description = "Modules shown in the center.";
|
||||
};
|
||||
right = mkOption {
|
||||
type = listOf str;
|
||||
default = [
|
||||
"tray"
|
||||
"custom/left-end"
|
||||
"temperature"
|
||||
"temperature#gpu"
|
||||
"keyboard-state#capslock"
|
||||
"keyboard-state#numlock"
|
||||
"wireplumber#sink"
|
||||
"bluetooth"
|
||||
"network"
|
||||
"idle_inhibitor"
|
||||
"custom/right-end"
|
||||
"custom/left-end"
|
||||
"clock"
|
||||
"battery"
|
||||
"custom/weather"
|
||||
"custom/right-end"
|
||||
];
|
||||
description = "Modules shown on the right.";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Waybar module layout.";
|
||||
};
|
||||
|
||||
# Network
|
||||
network = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
interface = mkOption {
|
||||
type = str;
|
||||
default = "wlan0";
|
||||
description = "Primary network interface name.";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Network configuration.";
|
||||
};
|
||||
|
||||
# Temperatures
|
||||
temperature = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
cpu = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
hwmonPath = mkOption {
|
||||
type = str;
|
||||
default = "/sys/class/hwmon/hwmon4/temp1_input";
|
||||
description = "CPU temperature hwmon path.";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
gpu = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Enable GPU temperature module.";
|
||||
};
|
||||
hwmonPath = mkOption {
|
||||
type = str;
|
||||
default = "/sys/class/hwmon/hwmon0/temp1_input";
|
||||
description = "GPU temperature hwmon path.";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Temperature module configuration.";
|
||||
};
|
||||
|
||||
# Features
|
||||
features = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
tray = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
bluetooth = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
idleInhibitor = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
keyboardIndicators = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
audio = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
sink = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
source = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = false; }; }; };
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
weather = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
hass = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = false; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
clock = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
|
||||
battery = mkOption {
|
||||
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Toggle optional Waybar features.";
|
||||
};
|
||||
|
||||
# Styling
|
||||
style = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
file = mkOption {
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = "Optional external CSS file to use instead of the inline style.";
|
||||
};
|
||||
fragmentsDir = mkOption {
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = "Optional directory of CSS fragments to append.";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Styling configuration.";
|
||||
};
|
||||
|
||||
# Extra overrides
|
||||
extra = mkOption {
|
||||
type = submodule {
|
||||
options = {
|
||||
settings = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Extra settings merged into settings.mainBar.";
|
||||
};
|
||||
style = mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
description = "Extra CSS appended to the computed style.";
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Extra settings/style hooks.";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user