added temperature to cpu waybar

This commit is contained in:
twoneis 2024-05-27 08:05:40 +02:00
parent 859e13d501
commit e7b406455c
2 changed files with 17 additions and 2 deletions

View file

@ -25,6 +25,7 @@ in lib.mkIf (osConfig.withNiri) {
modules-left = [ modules-left = [
"memory" "memory"
"cpu" "cpu"
"temperature"
]; ];
modules-center = [ modules-center = [
"clock" "clock"
@ -36,7 +37,13 @@ in lib.mkIf (osConfig.withNiri) {
]; ];
"cpu" = { "cpu" = {
interval = 10; interval = 10;
format = "{usage}% "; format = "{usage}%";
};
"temperature" = {
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
format = "{temperatureC}°C ";
interval = 10;
tooltip = false;
}; };
"memory" = { "memory" = {
interval = 30; interval = 30;

View file

@ -26,13 +26,17 @@ window#waybar {
#clock, #clock,
#battery, #battery,
#cpu,
#memory, #memory,
#network, #network,
#temperature,
#wireplumber { #wireplumber {
padding: 0 15px; padding: 0 15px;
} }
#cpu {
padding: 0 0 0 15px;
}
/*-----Indicators----*/ /*-----Indicators----*/
#battery.charging { #battery.charging {
color: #31748f; color: #31748f;
@ -43,3 +47,7 @@ window#waybar {
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
color: #eb6f92; color: #eb6f92;
} }
#temperature.critical {
color: #eb6f92;
}