From 26804d333be461c0df8d98bc8d9a0312904924e5 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sat, 4 Feb 2023 16:32:32 +0100 Subject: [PATCH] Add temperature to Waybar --- waybar/.config/waybar/config | 10 +++++++++- waybar/.config/waybar/style.css | 11 +++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index c542c75..6c21472 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -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 } } diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 13d7b2b..05a4501 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -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; +}