{"id":47680070,"url":"https://github.com/khofesh/desktop_temp_notif","last_synced_at":"2026-04-02T13:56:40.238Z","repository":{"id":346766540,"uuid":"1191425752","full_name":"khofesh/desktop_temp_notif","owner":"khofesh","description":"notify user when motherboard temperature exceeds threshold","archived":false,"fork":false,"pushed_at":"2026-03-26T05:06:08.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T13:35:45.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khofesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-25T08:26:33.000Z","updated_at":"2026-03-26T05:06:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/khofesh/desktop_temp_notif","commit_stats":null,"previous_names":["khofesh/desktop_temp_notif"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/khofesh/desktop_temp_notif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fdesktop_temp_notif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fdesktop_temp_notif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fdesktop_temp_notif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fdesktop_temp_notif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khofesh","download_url":"https://codeload.github.com/khofesh/desktop_temp_notif/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fdesktop_temp_notif/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-02T13:56:37.602Z","updated_at":"2026-04-02T13:56:40.230Z","avatar_url":"https://github.com/khofesh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Desktop Temperature Notification\n\nMonitors hardware temperatures and sends desktop notifications when configurable thresholds are exceeded. Runs as a background process.\n\nSupported platforms: **Linux**, **Windows**\n\n---\n\n## How it works\n\n```\n┌─────────────────────┐        ┌──────────────────┐        ┌─────────────────┐\n│   Sensor Reader     │──────▶ │   Main Loop       │──────▶ │    Notifier     │\n│                     │        │                   │        │                 │\n│ Linux:  lm-sensors  │        │ compare vs config │        │ Linux: libnotify│\n│ Windows: LHM direct │        │ cooldown tracking │        │ Windows: Toast  │\n└─────────────────────┘        └──────────────────┘        └─────────────────┘\n```\n\n- Polls sensors every `poll_interval` seconds (default: 30)\n- Fires a **Warning** notification when a sensor crosses its warning threshold\n- Fires a **Critical** notification when it crosses its critical threshold\n- Suppresses repeated notifications for the same sensor/level within `notification_cooldown` seconds (default: 300)\n- Escalation (Warning → Critical) always overrides the cooldown\n\n---\n\n## Prerequisites\n\n### Linux\n\n```bash\n# Fedora / RHEL\nsudo dnf install lm_sensors\n\n# Debian / Ubuntu\nsudo apt install lm-sensors\n\n# First-time sensor detection (run once)\nsudo sensors-detect --auto\n```\n\nA running desktop session with a notification daemon is required (GNOME, KDE, XFCE all provide one).\n\n### Windows\n\n- **Run as Administrator** — required for `LibreHardwareMonitorLib` to load its ring0 driver for direct hardware sensor access\n- **.NET runtime** — not required if using the self-contained release binary\n\nNo separate LibreHardwareMonitor process or HTTP server is needed. The app reads sensors directly via the embedded library.\n\n---\n\n## Build\n\n### Linux\n\n```bash\ncmake -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build\n```\n\nOptional dependencies (preferred paths):\n- `libnotify-dev` / `lm_sensors-devel` — enables native C API paths; falls back to `notify-send` and `popen(\"sensors\")` if absent\n\n### Windows\n\nRequires [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0).\n\n```bat\ncd platform\\windows\\CSharp\ndotnet build\n```\n\nTo produce a self-contained single `.exe` (no runtime install needed on target machine):\n\n```bat\ndotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true\n```\n\nBinaries:\n- Linux: `build/desktop_temp_notif`\n- Windows (build): `platform\\windows\\CSharp\\bin\\Release\\net10.0-windows10.0.19041.0\\win-x64\\DesktopTempNotif.exe`\n- Windows (publish): `platform\\windows\\CSharp\\bin\\Release\\net10.0-windows10.0.19041.0\\win-x64\\publish\\DesktopTempNotif.exe`\n\n### Pre-built releases\n\nDownload ready-to-run binaries from the [Releases](../../releases) page — no build tools required.\n\n---\n\n## Run\n\n### Linux\n\n```bash\n# Foreground\n./build/desktop_temp_notif\n\n# With config file\n./build/desktop_temp_notif config.linux.conf\n\n# Verbose — prints all sensor readings each poll cycle\n./build/desktop_temp_notif --verbose\n\n# Background (survives terminal close)\nnohup ./build/desktop_temp_notif config.linux.conf \u0026\n```\n\n### Windows\n\nMust be run as Administrator (required for hardware sensor access).\n\n```bat\nREM Foreground\nDesktopTempNotif.exe\n\nREM With config file\nDesktopTempNotif.exe config.windows.conf\n\nREM Verbose — prints sensor readings and threshold comparisons\nDesktopTempNotif.exe --verbose config.windows.conf\n\nREM Background (no console window)\nstart /B DesktopTempNotif.exe config.windows.conf\n```\n\n**Run at startup via Task Scheduler (recommended):**\n1. Open **Task Scheduler** → _Create Basic Task_\n2. Trigger: **At log on**\n3. Action: **Start a program** → path to `DesktopTempNotif.exe`, argument: path to config file\n4. _Properties → General_ → **Run with highest privileges** (needed for ring0 driver)\n\n---\n\n## Verbose mode\n\nPass `--verbose` (or `-v`) to print all sensor readings and threshold comparisons on each poll cycle. Useful for diagnosing sensor name mismatches or threshold issues.\n\n```\n[ok]   Core (Tctl/Tdie): 41.8°C (below warning 85.0°C)\n[ok]   DIMM #1: 40.3°C (below warning 50.0°C)\n[skip] GPU VR SoC: not found in sensor data\n[WARNING] Temperature: 62.5°C (threshold: 60.0°C)\n[poll] sleeping 30s...\n```\n\n---\n\n## Configuration\n\nWithout a config file the built-in defaults are used. Pass a config file path as an argument to override.\n\nConfig file format (key=value, lines starting with `#` are comments):\n\n```ini\n# seconds between sensor reads\npoll_interval=30\n\n# seconds before re-notifying the same sensor at the same alert level\nnotification_cooldown=300\n\n# per-sensor thresholds in °C\n# format: \u003csensor_name\u003e.warning=\u003cvalue\u003e  and  \u003csensor_name\u003e.critical=\u003cvalue\u003e\nSYSTIN.warning=70\nSYSTIN.critical=80\n```\n\nSample config files for each platform are included:\n- [`config.linux.conf`](config.linux.conf)\n- [`config.windows.conf`](config.windows.conf)\n\n### Finding sensor names\n\n**Linux** — run `sensors` and use the names exactly as shown (e.g. `SYSTIN`, `Tctl`, `temp1`).\n\n**Windows** — run `DesktopTempNotif.exe --list-sensors` (as Administrator) to dump all detected temperature sensors and their exact names to `sensors_dump.txt`. Use those names in your config file.\n\n```\nDesktopTempNotif.exe --list-sensors\n```\n\nExample output:\n```\n# Hardware                                  Type            Sensor Name                         Temp (°C)\n# ---------------------------------------- --------------- ----------------------------------- ---------\n  AMD Ryzen 7 PRO 8840U ...                 Cpu             Core (Tctl/Tdie)                    44.3\n  SK Hynix - HMCG88AGBSA095N (#1)          Memory          DIMM #1                             42.0\n  AMD Radeon 780M Graphics                  GpuAmd          GPU VR SoC                          44.0\n  UMIS RPETJ1T24MKP2QDQ                    Storage         Composite Temperature               36.0\n  UMIS RPETJ1T24MKP2QDQ                    Storage         Temperature #1                      35.9\n  UMIS RPETJ1T24MKP2QDQ                    Storage         Temperature #2                      37.9\n```\n\n\u003e Note: LHM may expose NVMe drive metadata (e.g. `Warning Temperature`, `Thermal Sensor High Limit`) as temperature-type sensors. These are drive limits, not actual readings — ignore them.\n\n### Default thresholds\n\n**Linux** (lm-sensors):\n\n| Sensor        | Warning (°C) | Critical (°C) |\n|---------------|-------------|---------------|\n| SYSTIN        | 70          | 80            |\n| CPUTIN        | 75          | 80            |\n| SMBUSMASTER 0 | 75          | 80            |\n| Tctl          | 85          | 95            |\n| Tccd1         | 85          | 95            |\n| Tccd2         | 85          | 95            |\n| temp1         | 100         | 115           |\n\n**Windows** (LibreHardwareMonitor):\n\n| Sensor           | Warning (°C) | Critical (°C) |\n|------------------|-------------|---------------|\n| Core (Tctl/Tdie)      | 85          | 95            |\n| DIMM #1               | 50          | 80            |\n| GPU VR SoC            | 80          | 100           |\n| Composite Temperature | 60          | 79            |\n| Temperature #1        | 60          | 79            |\n| Temperature #2        | 60          | 79            |\n\n\u003e Sensor names vary by hardware. Always verify with `sensors` (Linux) or `--verbose` (Windows).\n\n---\n\n## Troubleshooting\n\n### No notifications appear (Windows)\n\n- Confirm you are running as Administrator.\n- Run with `--verbose` and check for `[WARNING]` or `[CRITICAL]` lines — if they appear but no toast shows, check Windows **Focus Assist** / **Do Not Disturb** settings.\n- Verify the sensor names in your config match what `--list-sensors` reports.\n\n### No sensors read (Windows)\n\nIf `--verbose` shows all sensors as `not found in sensor data`, the ring0 driver failed to load. Ensure the process has Administrator privileges.\n\n### Sensor names not matching\n\nSensor names differ by hardware and driver version. Use `--verbose` to see exact names being reported, then update your config file to match.\n\n### Linux: notifications not appearing\n\nEnsure a notification daemon is running (`notify-send \"test\" \"hello\"` should show a popup).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhofesh%2Fdesktop_temp_notif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhofesh%2Fdesktop_temp_notif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhofesh%2Fdesktop_temp_notif/lists"}