waybar: add cpu temperature widget

This commit is contained in:
Olexandr Smirnov 2025-07-08 15:07:58 +03:00
parent d547f3db83
commit c51774f030
No known key found for this signature in database
4 changed files with 10 additions and 5 deletions

View file

@ -7,11 +7,11 @@
"margin-left": 0, "margin-left": 0,
"margin-right": 0, "margin-right": 0,
"include": [ "include": [
"~/.config/waybar/modules/info.json", "~/.config/waybar/modules/info.jsonc",
"~/.config/waybar/modules/niri.json" "~/.config/waybar/modules/niri.json"
], ],
"modules-left": ["niri/workspaces", "niri/window"], "modules-left": ["niri/workspaces", "niri/window"],
"modules-center": ["clock"], "modules-center": ["clock", "temperature"],
"modules-right": [ "modules-right": [
"niri/language", "niri/language",
"tray", "tray",

View file

@ -10,7 +10,7 @@
"margin-right": 0, "margin-right": 0,
"include": [ "include": [
"~/.config/waybar/modules/hypr.json", "~/.config/waybar/modules/hypr.json",
"~/.config/waybar/modules/info.json" "~/.config/waybar/modules/info.jsonc"
], ],
"modules-left": ["hyprland/workspaces", "hyprland/window"], "modules-left": ["hyprland/workspaces", "hyprland/window"],

View file

@ -8,6 +8,11 @@
"format": " {:%a, %d %b %H:%M}", // replace %I with %H for 24h format "format": " {:%a, %d %b %H:%M}", // replace %I with %H for 24h format
}, },
"temperature": {
"hwmon-path": "/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.0/hwmon/hwmon3/temp1_input",
"format": " {temperatureC}°C"
},
"battery": { "battery": {
"format": "{icon} {capacity}%", "format": "{icon} {capacity}%",
"format-charging": "{icon} {capacity}%", "format-charging": "{icon} {capacity}%",

View file

@ -29,7 +29,7 @@ tooltip {
border: 1px solid @bg-darker-color; border: 1px solid @bg-darker-color;
} }
#language, #cpu, #memory, #workspaces, #window, #tray, #clock, #battery, #power-profiles-daemon, #pulseaudio, #network, #backlight { #language, #cpu, #memory, #workspaces, #window, #tray, #clock, #battery, #power-profiles-daemon, #pulseaudio, #network, #backlight, #temperature {
background-color: @bg-darker-color; background-color: @bg-darker-color;
color: @fg-color; color: @fg-color;
border-radius: 16px; border-radius: 16px;
@ -38,7 +38,7 @@ tooltip {
} }
#network, #backlight { color: @blue; } #network, #backlight { color: @blue; }
#cpu, #pulseaudio, #memory, #clock { color: @active-bg-color; } #cpu, #pulseaudio, #memory, #clock, #temperature { color: @active-bg-color; }
#language { color: @red; } #language { color: @red; }
#workspaces button { color: @active-bg-color; } #workspaces button { color: @active-bg-color; }