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,
"modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"],
"modules-right": ["network", "pulseaudio", "backlight", "cpu", "temperature", "memory", "battery", "tray"],
"sway/workspaces": {
"disable-scroll": true
},
@ -80,5 +80,13 @@
"backlight": {
"format": "{icon} {percent}%",
"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,
#disk,
#temperature,
#temperature,
#backlight,
#network,
#pulseaudio,
@ -197,3 +198,13 @@ label:focus {
color: @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;
}