|
| 1 | +{ |
| 2 | + // =============================================================================== |
| 3 | + // WAYBAR TEMPERATURE MODULES CONFIGURATION // Best for laptops |
| 4 | + // =============================================================================== |
| 5 | + // |
| 6 | + // IMPORTANT: This module configuration is DEVICE SPECIFIC but worth the manual setup! |
| 7 | + // |
| 8 | + // WHY USE thermal-zone INSTEAD OF custom/cpuinfo and custom/gpuinfo: |
| 9 | + // - FASTER: Direct kernel thermal zone access (no subprocess overhead) |
| 10 | + // - LOWER CPU USAGE: No script execution or command parsing |
| 11 | + // - MORE RELIABLE: Direct hardware sensor access via sysfs |
| 12 | + // - CLEANER: No dependency on external tools (sensors, nvidia-smi, etc.) |
| 13 | + // |
| 14 | + // REPLACES these custom modules with better performance: |
| 15 | + // - custom/cpuinfo -> temperature#27 (thermal-zone method) |
| 16 | + // - custom/gpuinfo -> temperature#2 (thermal-zone method) |
| 17 | + // - custom/sensorsinfo -> temperature#0 (thermal-zone method) |
| 18 | + // |
| 19 | + // SETUP REQUIRED: Follow the instructions below to identify YOUR thermal zones! |
| 20 | + // =============================================================================== |
| 21 | + // |
| 22 | + // HOW TO IDENTIFY YOUR THERMAL ZONES: |
| 23 | + // |
| 24 | + // 1. List all thermal zones: |
| 25 | + // ls /sys/class/thermal/thermal_zone*/type |
| 26 | + // |
| 27 | + // 2. Check thermal zone types (fish shell): |
| 28 | + // for i in (seq 0 10); echo "Zone $i: "(cat /sys/class/thermal/thermal_zone$i/type 2>/dev/null; or echo "N/A"); end |
| 29 | + // |
| 30 | + // 3. Get current temperatures: |
| 31 | + // sensors |
| 32 | + // |
| 33 | + // 4. Match thermal zone with actual sensor: |
| 34 | + // cat /sys/class/thermal/thermal_zone2/temp (Returns millicelsius: 44050 = 44.05°C) |
| 35 | + // nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits (Compare) |
| 36 | + // |
| 37 | + // 5. Common thermal zones: |
| 38 | + // - acpitz: ACPI thermal zone (general system) |
| 39 | + // - x86_pkg_temp: CPU package temperature |
| 40 | + // - coretemp: Individual CPU cores |
| 41 | + // - SEN1/SEN2/etc: OEM-specific sensors (could be GPU, chipset, etc.) |
| 42 | + // - iwlwifi_*: WiFi adapter temperature |
| 43 | + // - pch_*: Platform Controller Hub |
| 44 | + // |
| 45 | + // PERFORMANCE NOTES: |
| 46 | + // - thermal-zone method is FASTER than custom scripts (no subprocess overhead) |
| 47 | + // - hwmon-path method is also fast but less portable |
| 48 | + // - Custom scripts have higher CPU usage but more flexibility |
| 49 | + // |
| 50 | + // DOCUMENTATION: https://man.archlinux.org/man/waybar-temperature.5.en |
| 51 | + // =============================================================================== |
| 52 | + |
| 53 | + // ? Below are the configurations for my laptop // only use as a reference! |
| 54 | + |
| 55 | + // GPU Temperature Monitor (NVIDIA via thermal zone) |
| 56 | + "temperature#2": { |
| 57 | + "thermal-zone": 2, // SEN1 - NVIDIA GPU on this system |
| 58 | + |
| 59 | + // Temperature thresholds for GPU |
| 60 | + "critical-threshold": 65, // NVIDIA typical max temp |
| 61 | + "warning-threshold": 55, // Start warning at 75°C |
| 62 | + |
| 63 | + // Update frequency |
| 64 | + "interval": 2, |
| 65 | + |
| 66 | + // Display formats with GPU-specific styling |
| 67 | + "format": " {temperatureC}°C", |
| 68 | + "format-warning": "<span color='#fab387'></span> {temperatureC}°C", |
| 69 | + "format-critical": "<span color='#f38ba8'></span> {temperatureC}°C", |
| 70 | + |
| 71 | + // Tooltip |
| 72 | + "tooltip": true, |
| 73 | + "tooltip-format": "GPU Temperature: {temperatureC}°C\nNVIDIA GeForce MX250", |
| 74 | + |
| 75 | + // Appearance |
| 76 | + "max-length": 12, |
| 77 | + "min-length": 2 |
| 78 | + }, |
| 79 | + |
| 80 | + // CPU Temperature Monitor |
| 81 | + "temperature#27": { |
| 82 | + "thermal-zone": 27, // x86_pkg_temp - CPU package temperature |
| 83 | + |
| 84 | + // Temperature thresholds for CPU |
| 85 | + "critical-threshold": 85, // CPU critical temp |
| 86 | + "warning-threshold": 70, // CPU warning temp |
| 87 | + |
| 88 | + // Update frequency |
| 89 | + "interval": 2, |
| 90 | + |
| 91 | + // Display formats with CPU-specific styling |
| 92 | + "format": " {temperatureC}°C", |
| 93 | + "format-warning": "<span color='#fab387'></span> {temperatureC}°C", |
| 94 | + "format-critical": "<span color='#f38ba8'></span> {temperatureC}°C", |
| 95 | + |
| 96 | + // Tooltip |
| 97 | + "tooltip": true, |
| 98 | + "tooltip-format": "CPU Temperature: {temperatureC}°C\nIntel(R) Core(TM) i7-10510U", |
| 99 | + |
| 100 | + // Appearance |
| 101 | + "max-length": 12, |
| 102 | + "min-length": 2 |
| 103 | + }, |
| 104 | + |
| 105 | + // System/ACPI Temperature Monitor |
| 106 | + "temperature#0": { |
| 107 | + "thermal-zone": 0, // acpitz - ACPI thermal zone |
| 108 | + |
| 109 | + // Temperature thresholds |
| 110 | + "critical-threshold": 50, |
| 111 | + "warning-threshold": 40, |
| 112 | + |
| 113 | + // Update frequency |
| 114 | + "interval": 5, |
| 115 | + |
| 116 | + // Display formats with system-specific styling |
| 117 | + "format-warning": "<span color='#fab387'></span> {temperatureC}°C", |
| 118 | + "format-critical": "<span color='#f38ba8'></span> {temperatureC}°C", |
| 119 | + |
| 120 | + // Tooltip |
| 121 | + "tooltip": true, |
| 122 | + "tooltip-format": "System Temperature: {temperatureC}°C\nACPI Thermal Zone", |
| 123 | + |
| 124 | + // Appearance |
| 125 | + "max-length": 12, |
| 126 | + "min-length": 2 |
| 127 | + } |
| 128 | +} |
0 commit comments