From cda7ae66438505664341f75ff601cdca20c2d4a6 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Thu, 15 May 2025 00:37:11 +0200 Subject: [PATCH] waybar temperature -> custom/cputemp --- custom-droneship/waybar/local_config.jsonc | 13 ------------- custom-mothership/waybar/local_config.jsonc | 13 ------------- waybar/config.jsonc | 14 +++++++++++++- waybar/style.css | 2 +- 4 files changed, 14 insertions(+), 28 deletions(-) diff --git a/custom-droneship/waybar/local_config.jsonc b/custom-droneship/waybar/local_config.jsonc index 84bdd32..d696c75 100644 --- a/custom-droneship/waybar/local_config.jsonc +++ b/custom-droneship/waybar/local_config.jsonc @@ -1,11 +1,4 @@ { - "temperature": { - "hwmon-path": "/sys/devices/platform/asus-ec-sensors/hwmon/hwmon3/temp2_input", - "critical-threshold": 80, - "format-critical": "{temperatureC}°C ", - "format": " {temperatureC}°C", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 watch sensors'" - }, "disk#disk1": { "path": "/", "interval": 30, @@ -20,12 +13,6 @@ "unit": "GB", "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /mnt/hdd1/'" }, - "custom/nvidia": { - "exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'", - "format": "󰓅 {}", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'", - "interval": 1 - }, "network": { "interface": "enp6s0", "interval": 5, diff --git a/custom-mothership/waybar/local_config.jsonc b/custom-mothership/waybar/local_config.jsonc index 1895ac2..8ca3459 100644 --- a/custom-mothership/waybar/local_config.jsonc +++ b/custom-mothership/waybar/local_config.jsonc @@ -1,11 +1,4 @@ { - "temperature": { - "hwmon-path": "/sys/devices/platform/asus-ec-sensors/hwmon/hwmon3/temp2_input", - "critical-threshold": 80, - "format-critical": "{temperatureC}°C ", - "format": " {temperatureC}°C", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 watch sensors'" - }, "disk#disk1": { "path": "/", "interval": 30, @@ -20,12 +13,6 @@ "unit": "GB", "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /mnt/hdd1/'" }, - "custom/nvidia": { - "exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'", - "format": "󰓅 {}", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'", - "interval": 1 - }, "network": { "interface": "wlp5s0", "interval": 5, diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 44f4102..5ff5f32 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -18,7 +18,19 @@ "tooltip": false }, - "modules-left": ["systemd-failed-units", "memory", "load", "temperature", "custom/nvidia", "disk#disk1", "disk#disk2", "network"], + "modules-left": ["systemd-failed-units", "memory", "load", "custom/cputemp", "custom/nvidia", "disk#disk1", "disk#disk2", "network"], + "custom/cputemp": { + "exec": "sensors | grep 'CPU:' | awk '{print substr($2,2); }'", + "format": " {}", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 watch sensors'", + "interval": 1 + }, + "custom/nvidia": { + "exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'", + "format": "󰓅 {}", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'", + "interval": 1 + }, "load": { "interval": 1, "format": "󰘚 {load1}%", diff --git a/waybar/style.css b/waybar/style.css index aba2dda..b5b97aa 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -36,6 +36,7 @@ window#waybar:first-child > box { } #clock, +#custom-cputemp, #custom-scratchpad, #custom-nvidia, #custom-theme, @@ -47,7 +48,6 @@ window#waybar:first-child > box { #pulseaudio, #sway-mode, #systemd-failed-units, -#temperature, #tray { color: #88c0d0; padding-right: 16px;