waybar: Add profile option

This commit is contained in:
Erwin Boskma 2024-10-23 16:24:05 +02:00
parent 488637ff4b
commit 19415ddf40
Signed by: erwin
SSH key fingerprint: SHA256:OCinH/khuGY1LA9RG8YLM8GNH6C1DDXBdy3SNE+I5Hw
2 changed files with 12 additions and 1 deletions

View file

@ -13,6 +13,14 @@ in
enable = mkEnableOption "Enable waybar"; enable = mkEnableOption "Enable waybar";
sway = mkEnableOption "sway"; sway = mkEnableOption "sway";
river = mkEnableOption "river"; river = mkEnableOption "river";
profile = mkOption {
description = "";
type = types.enum [
"home"
"work"
];
default = "home";
};
cpuTempPath = mkOption { cpuTempPath = mkOption {
description = "The path to the CPU temperature sensor in sysfs"; description = "The path to the CPU temperature sensor in sysfs";
@ -41,8 +49,10 @@ in
"sway/workspaces" "sway/workspaces"
"sway/mode" "sway/mode"
] ]
++ [ "custom/now_playing" ]; ++ lib.optional (cfg.profile == "home") "custom/now_playing";
modules-center = (lib.optional cfg.sway "sway/window") ++ (lib.optional cfg.river "river/window"); modules-center = (lib.optional cfg.sway "sway/window") ++ (lib.optional cfg.river "river/window");
modules-right = [ modules-right = [
"network" "network"
"memory" "memory"

View file

@ -167,6 +167,7 @@ in
waybar = { waybar = {
enable = true; enable = true;
sway = true; sway = true;
profile = "work";
cpuTempPath = "/sys/class/hwmon/hwmon1/temp2_input"; cpuTempPath = "/sys/class/hwmon/hwmon1/temp2_input";
}; };
}; };