From e1f75d7c82eae93857dc99c87fac239e6ef52ef6 Mon Sep 17 00:00:00 2001 From: Nicholai Date: Sun, 26 Oct 2025 00:02:13 -0600 Subject: [PATCH] added temperature readouts --- config.jsonc | 92 +++++++++++++++++++++++++++---------- nohup.out | 116 +++++++++++++++++++++++++++++++++++++++++++++++ scripts/temps.sh | 18 ++++++++ style.css | 7 +++ 4 files changed, 210 insertions(+), 23 deletions(-) create mode 100644 nohup.out create mode 100755 scripts/temps.sh diff --git a/config.jsonc b/config.jsonc index 9f7781f..88be678 100644 --- a/config.jsonc +++ b/config.jsonc @@ -1,10 +1,30 @@ - { "layer": "top", "position": "top", - "modules-left": ["hyprland/workspaces", "custom/weather","custom/wallpaper","hyprland/window"], - "modules-center": ["clock"], - "modules-right": ["network", "bluetooth", "temperature","custom/power_profile","custom/battery","backlight","pulseaudio","pulseaudio#microphone","tray","idle_inhibitor","cpu","memory","battery#bat2"], + "modules-left": [ + "hyprland/workspaces", + "custom/weather", + "custom/wallpaper", + "hyprland/window" + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "network", + "bluetooth", + "custom/temps", + "custom/power_profile", + "custom/battery", + "backlight", + "pulseaudio", + "pulseaudio#microphone", + "tray", + "idle_inhibitor", + "cpu", + "memory", + "battery#bat2" + ], // "modules-left": [], "sway/mode": { "format": "{}" @@ -71,18 +91,24 @@ "tooltip-format-disconnected": "MPD (disconnected)" }, "hyprland/workspaces": { - "format": "{icon}", - "format-icons": { - "1": "1", - "2": "2", - "3": "3", - "4": "4", - "5": "5", - "default": "●" - }, + "format": "{icon}", + "format-icons": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "default": "●" + }, "persistent-workspaces": { - "Virtual-1": [1, 2, 3, 4, 5] - }, + "Virtual-1": [ + 1, + 2, + 3, + 4, + 5 + ] + }, "on-click": "activate" }, "idle_inhibitor": { @@ -109,16 +135,20 @@ "memory": { "format": "{}% " }, - "temperature": { - "thermal-zone": 1, - "critical-threshold": 80, - "format": "{temperatureF}°F ", - "format-critical": "{temperatureF}°F ", + "custom/temps": { + "exec": "~/.config/waybar/scripts/temps.sh", + "interval": 2, + "return-type": "json", + "format": "{}", "tooltip": true }, "backlight": { "format": "{icon} {percent}%", - "format-icons": ["󰃞", "󰃟", "󰃠"], + "format-icons": [ + "󰃞", + "󰃟", + "󰃠" + ], "on-scroll-up": "brightnessctl set 5%+", "on-scroll-down": "brightnessctl set 5%-", "min-length": 6 @@ -136,7 +166,19 @@ "format-charging": " {capacity}%", "format-plugged": " {capacity}%", "format-alt": "{time} {icon}", - "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], + "format-icons": [ + "󰂎", + "󰁺", + "󰁻", + "󰁼", + "󰁽", + "󰁾", + "󰁿", + "󰂀", + "󰂁", + "󰂂", + "󰁹" + ], "tooltip": true, "tooltip-format": "{status} • {capacity}%\n{timeTo}\nHealth: {health}", "max-length": 15 @@ -176,7 +218,11 @@ "phone": "", "portable": "", "car": "", - "default": ["", "", ""] + "default": [ + "", + "", + "" + ] } }, "pulseaudio#microphone": { diff --git a/nohup.out b/nohup.out new file mode 100644 index 0000000..70dd2a9 --- /dev/null +++ b/nohup.out @@ -0,0 +1,116 @@ +[2025-10-25 23:56:16.835] [info] Using configuration file /home/nicholai/.config/waybar/config.jsonc +[2025-10-25 23:56:16.836] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop +[2025-10-25 23:56:16.836] [info] Using CSS file /home/nicholai/.config/waybar/style.css +[2025-10-25 23:56:16.838] [info] Hyprland IPC starting +[2025-10-25 23:56:16.839] [info] Loading persistent workspaces from Waybar config +[2025-10-25 23:56:16.839] [info] Loading persistent workspaces from Hyprland workspace rules +[2025-10-25 23:56:16.840] [warning] 'swap-icon-label' must be a bool. +[2025-10-25 23:56:16.844] [warning] module backlight: Disabling module "backlight", No backlight found +[2025-10-25 23:56:16.845] [warning] No battery named BAT2 +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +[2025-10-25 23:56:16.958] [info] Bar configured (width: 3840, height: 34) for output: DP-3 +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +powerprofilesctl not available +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +powerprofilesctl not available +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found +sh: line 1: powerprofilesctl: command not found +sh: line 1: /home/Nicholai/.config/waybar/scripts/battery.sh: No such file or directory +sh: line 1: powerprofilesctl: command not found diff --git a/scripts/temps.sh b/scripts/temps.sh new file mode 100755 index 0000000..5e47950 --- /dev/null +++ b/scripts/temps.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Get CPU temp from k10temp (Tctl) +cpu_temp=$(sensors k10temp-pci-00c3 2>/dev/null | grep 'Tctl:' | awk '{print $2}' | sed 's/+//;s/°C//') + +# Get GPU temp from amdgpu +gpu_temp=$(sensors amdgpu-pci-1600 2>/dev/null | grep 'edge:' | awk '{print $2}' | sed 's/+//;s/°C//') + +# Get Coolant temp from Kraken +coolant_temp=$(sensors kraken2023-hid-3-9 2>/dev/null | grep 'Coolant' | awk '{print $3}' | sed 's/+//;s/°C//') + +# Round temps +cpu_temp=$(printf "%.0f" "$cpu_temp" 2>/dev/null || echo "N/A") +gpu_temp=$(printf "%.0f" "$gpu_temp" 2>/dev/null || echo "N/A") +coolant_temp=$(printf "%.0f" "$coolant_temp" 2>/dev/null || echo "N/A") + +# Output +echo "{\"text\":\" ${cpu_temp}° ${gpu_temp}° ${coolant_temp}°\", \"tooltip\":\"CPU: ${cpu_temp}°C | GPU: ${gpu_temp}°C | Coolant: ${coolant_temp}°C\"}" diff --git a/style.css b/style.css index 95c4b6c..b4e7598 100644 --- a/style.css +++ b/style.css @@ -172,6 +172,13 @@ label:focus { color: #ffffff; } +#custom-temps { + background-color: #000000; + color: #ffffff; + padding: 0 10px; + margin: 6px 3px; +} + #tray { background-color: #000000; color: #ffffff;