diff --git a/nix/hm-module.nix b/nix/hm-module.nix index f20a3eb..c706f45 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -87,7 +87,6 @@ in "bluetooth" "network" "powerProfile" - "gpu" "cpu" "memory" "idleInhibitor" @@ -171,6 +170,18 @@ in description = "Brightness adjustment step (%)."; }; }; + gpu = moduleOpt "gpu" { + warm = lib.mkOption { + type = lib.types.int; + default = 70; + description = "GPU temperature threshold for warm state (°C)."; + }; + hot = lib.mkOption { + type = lib.types.int; + default = 85; + description = "GPU temperature threshold for hot state (°C)."; + }; + }; temperature = moduleOpt "temperature" { warm = lib.mkOption { type = lib.types.int; diff --git a/shell/applets/GpuApplet.qml b/shell/applets/GpuApplet.qml index 65164be..896b1e0 100644 --- a/shell/applets/GpuApplet.qml +++ b/shell/applets/GpuApplet.qml @@ -158,7 +158,7 @@ Column { height: 22 label: "Temp" value: S.SystemStats.gpuTempC + "\u00B0C" - valueColor: S.SystemStats.gpuTempC > 85 ? S.Theme.base08 : S.SystemStats.gpuTempC > 70 ? S.Theme.base0A : S.Theme.base05 + valueColor: S.SystemStats.gpuTempC > S.Modules.gpu.hot ? S.Theme.base08 : S.SystemStats.gpuTempC > S.Modules.gpu.warm ? S.Theme.base0A : S.Theme.base05 } Item { diff --git a/shell/services/Modules.qml b/shell/services/Modules.qml index 897a38e..2f1bedc 100644 --- a/shell/services/Modules.qml +++ b/shell/services/Modules.qml @@ -60,7 +60,9 @@ QtObject { device: "" }) property var gpu: ({ - enable: true + enable: true, + warm: 70, + hot: 85 }) property var cpu: ({ enable: true