Add temperature to Waybar

This commit is contained in:
Sam A. 2023-02-04 16:32:32 +01:00
parent 84e5d2735e
commit 26804d333b
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
2 changed files with 20 additions and 1 deletions

View file

@ -5,7 +5,7 @@
"height": 36, "height": 36,
"modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"], "modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"],
"modules-center": ["clock"], "modules-center": ["clock"],
"modules-right": ["network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"], "modules-right": ["network", "pulseaudio", "backlight", "cpu", "temperature", "memory", "battery", "tray"],
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true "disable-scroll": true
}, },
@ -80,5 +80,13 @@
"backlight": { "backlight": {
"format": "{icon} {percent}%", "format": "{icon} {percent}%",
"format-icons": ["", "", "", "", "", "", "", "", ""] "format-icons": ["", "", "", "", "", "", "", "", ""]
},
"temperature": {
"thermal-zone": 1,
"critical-threshold": 80,
"format": "{icon} {temperatureC}°C",
"format-critical": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""],
"interval": 5
} }
} }

View file

@ -82,6 +82,7 @@ window#waybar.hidden {
#memory, #memory,
#disk, #disk,
#temperature, #temperature,
#temperature,
#backlight, #backlight,
#network, #network,
#pulseaudio, #pulseaudio,
@ -197,3 +198,13 @@ label:focus {
color: @violet; color: @violet;
box-shadow: inset 0 3px @violet; box-shadow: inset 0 3px @violet;
} }
#temperature {
color: @yellow;
box-shadow: inset 0 3px @yellow;
}
#temperature.critical {
color: @orange;
box-shadow: inset 0 3px @orange;
}