waybar: Add profile option
This commit is contained in:
parent
488637ff4b
commit
19415ddf40
2 changed files with 12 additions and 1 deletions
|
@ -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"
|
||||||
|
|
|
@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue