Skip to content

About

Laptop DIsplay Hz Controller

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Display Hz Controller

A lightweight, modern, and DPI-aware Windows 11 system tray utility that automatically controls your primary display's refresh rate based on your active power source.

It maximizes battery savings by lowering the refresh rate when on battery power, and restores fluid high-performance (e.g., 90Hz, 120Hz, 144Hz, 240Hz+) when connected to AC power.


Key Features

  • 🔋 Charger-Based Auto Toggle: Automatically switches display refresh rate when you plug in or unplug your charger.
  • 🖥️ Dynamic Rate Selection: Automatically queries and caches the display refresh rates supported by your monitor at the active resolution (no hardcoded frequencies).
  • 📋 Registry Persistence: Saves your selected AC Power and Battery refresh rate preferences in the Windows Registry (HKCU\Software\DisplayHzController) so they persist across system reboots.
  • 🎨 Windows 11 Fluent UI Flyout:
    • Rounded corners and dark mode theme applied natively via Desktop Window Manager (DWM) interop.
    • Custom-drawn Status Card with real-time refresh rate monitoring and a glowing charger LED indicator dot (Green for AC, Amber for Battery).
    • Modern owner-drawn Dark ComboBoxes with custom chevron icons and Windows 11 style rounded inset selection highlights.
    • Customizable 1px border and a subtle horizontal top gradient accent line.
  • 🖱️ Tray Context Menu: Customized Professional Renderer creating left-aligned context menu items, proper padding, and inset rounded hover states.
  • ⚙️ Launch at Startup: Toggle launching on Windows startup directly from the application's flyout UI.
  • 🔔 Native System Notifications: Receives clean taskbar balloon tip alerts when the refresh rate is automatically updated.
  • 💎 Clean GDI Lifecycle: Zero memory or GDI handle leaks by properly managing native HICON destructions on exit.

Screenshots & Layout

The flyout UI measures a compact 440 x 240 (auto-scaled dynamically for High-DPI screens):

  1. Header: Display symbol + "Display Hz Controller" title.
  2. Current Status Card: Glowing LED Dot + active Power Source + real-time monitor refresh rate.
  3. Preferences: Left and right selection dropdowns for AC Power and Battery refresh rates.
  4. Startup Checkbox: "Launch at Windows startup" toggle.

Requirements


Build & Installation

1. Build the Source

Open a terminal in the project directory and run:

dotnet build -c Release

The compiled executable will be generated under bin\Release\net10.0-windows\DisplayHzController.exe.

2. Create the Installer

We include an Inno Setup script to easily package the application for distribution:

  1. Ensure Inno Setup 6 is installed.
  2. Compile the installer by running:
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" DisplayHzController.iss

This generates a standalone displayhertz.exe installer file on your desktop.


License

This project is open-source and free to use. Non-commercial use is recommended for the Inno Setup packaging presets.

About

Laptop DIsplay Hz Controller

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages