waybar: Make temperature module input path configurable
This commit is contained in:
parent
83c0196bf3
commit
c332c4a78b
2 changed files with 8 additions and 2 deletions
|
@ -13,6 +13,11 @@ in
|
||||||
enable = mkEnableOption "Enable waybar";
|
enable = mkEnableOption "Enable waybar";
|
||||||
sway = mkEnableOption "sway";
|
sway = mkEnableOption "sway";
|
||||||
river = mkEnableOption "river";
|
river = mkEnableOption "river";
|
||||||
|
|
||||||
|
cpuTempPath = mkOption {
|
||||||
|
description = "The path to the CPU temperature sensor in sysfs";
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -168,7 +173,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
"temperature" = {
|
"temperature" = {
|
||||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
hwmon-path = cfg.cpuTempPath;
|
||||||
critical-threshold = 80;
|
critical-threshold = 80;
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format = "{icon} {temperatureC}°C";
|
format = "{icon} {temperatureC}°C";
|
||||||
|
|
|
@ -66,7 +66,7 @@ in
|
||||||
foot = {
|
foot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = false;
|
server = false;
|
||||||
fontSize = 12;
|
fontSize = 16;
|
||||||
};
|
};
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -166,6 +166,7 @@ in
|
||||||
waybar = {
|
waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sway = true;
|
sway = true;
|
||||||
|
cpuTempPath = "/sys/class/hwmon/hwmon1/temp2_input";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Reference in a new issue