| Crates.io | spotlight-dimmer |
| lib.rs | spotlight-dimmer |
| version | 0.7.3-beta.2 |
| created_at | 2025-10-06 23:59:47.708092+00 |
| updated_at | 2025-10-21 22:24:32.204491+00 |
| description | A lightweight application that dims inactive displays to highlight the active one |
| homepage | https://github.com/thomazmoura/spotlight-dimmer |
| repository | https://github.com/thomazmoura/spotlight-dimmer |
| max_upload_size | |
| id | 1871015 |
| size | 625,154 |
A lightweight Windows application that dims inactive displays to highlight the active one. Built with pure Rust and Windows API for maximum performance and minimal resource usage.
Para a versão em português vá para: LEIAME.md
Spotlight Dimmer is a program for Windows that dims all the monitors other than the monitor that has the currently focused program.
It's intended to help people who use multiple monitores to focus and assist in quickly noticing which window has the current focus while changing focus with shortcuts like alt + tab. It's specially useful for users who navigate mainly with the keyboard. It helps to avoid silly situations like typing terminal commands on Teams because you're looking at a screen while the focus is on the other screen.
%APPDATA%\spotlight-dimmer\config.tomlspotlight-dimmer-v*-installer.exe from the GitHub Releases page.Uninstall: Open Windows Settings → Apps → Installed apps, search for "Spotlight Dimmer", and click Uninstall (or run the uninstaller from the Start Menu folder).
The easiest way to install Spotlight Dimmer is through npm:
npm install -g spotlight-dimmer
Requirements:
The package includes pre-built binaries - no compilation needed! After installation, the commands spotlight-dimmer and spotlight-dimmer-config will be available globally.
Uninstall:
npm uninstall -g spotlight-dimmer
If you prefer to build and install manually using Cargo:
cargo build --release --bin spotlight-dimmer --bin spotlight-dimmer-config
Binaries will be in target\release\:
spotlight-dimmer.exe - Main applicationspotlight-dimmer-config.exe - Configuration toolYou can also use the PowerShell installation script:
.\install.ps1
If installed via Windows installer:
If installed via npm, cargo, or portable zip:
spotlight-dimmer.exe
The application will:
%APPDATA%\spotlight-dimmer\config.toml (or create default)The system tray icon provides quick access to key functions:
Alternative ways to stop the application:
# Using PowerShell
Get-Process spotlight-dimmer | Stop-Process
Or use Task Manager to end the spotlight-dimmer.exe process.
Use spotlight-dimmer-config.exe to manage all settings:
# Show current configuration
spotlight-dimmer-config status
# Inactive overlay commands (dims non-active displays)
spotlight-dimmer-config enable # Enable inactive display dimming
spotlight-dimmer-config disable # Disable inactive display dimming
spotlight-dimmer-config color 0 0 0 0.7 # Set inactive overlay color (RGB 0-255, alpha 0.0-1.0)
# Active overlay commands (highlights active display)
spotlight-dimmer-config active-enable # Enable active display overlay
spotlight-dimmer-config active-disable # Disable active display overlay
spotlight-dimmer-config active-color 50 100 255 0.15 # Set active overlay color
# Partial dimming commands (dims empty areas around focused window)
spotlight-dimmer-config partial-enable # Enable partial dimming
spotlight-dimmer-config partial-disable # Disable partial dimming
# Profile commands
spotlight-dimmer-config list-profiles # List all saved profiles
spotlight-dimmer-config set-profile dark-mode # Load and apply a saved profile
spotlight-dimmer-config save-profile my-setup # Save current settings as a profile
spotlight-dimmer-config delete-profile my-setup # Delete a saved profile
# General commands
spotlight-dimmer-config reset # Reset to defaults
spotlight-dimmer-config help # Show all available commands
Note: Configuration changes are automatically detected and reloaded within 2 seconds. No restart needed!
Configuration is stored at %APPDATA%\spotlight-dimmer\config.toml:
is_dimming_enabled = true
is_active_overlay_enabled = false
is_paused = false
is_partial_dimming_enabled = false
# Inactive overlay color (for non-active displays)
[overlay_color]
r = 0
g = 0
b = 0
a = 0.5
# Active overlay color (for active display, optional)
[active_overlay_color]
r = 50
g = 100
b = 255
a = 0.15
# Saved profiles (two default profiles: "light-mode" and "dark-mode")
[profiles.light-mode]
is_dimming_enabled = true
is_active_overlay_enabled = false
is_partial_dimming_enabled = true
[profiles.light-mode.overlay_color]
r = 0
g = 0
b = 0
a = 0.5
[profiles.dark-mode]
is_dimming_enabled = true
is_active_overlay_enabled = true
is_partial_dimming_enabled = true
[profiles.dark-mode.overlay_color]
r = 0
g = 0
b = 0
a = 0.7
[profiles.dark-mode.active_overlay_color]
r = 0
g = 0
b = 0
a = 0.3
spotlight-dimmer.exe)winapi crateWS_EX_LAYERED) with alpha blendingGetForegroundWindow() and MonitorFromWindow()spotlight-dimmer-config.exe)clap for argument parsingtoml crateWS_EX_TRANSPARENT flag ensures overlays don't capture inputWS_EX_TOPMOST keeps overlays above other windowsWS_EX_TOOLWINDOW prevents overlays from appearing in Alt+TabWS_EX_NOACTIVATE prevents overlays from stealing focusSetLayeredWindowAttributes() with LWA_ALPHA for smooth dimming.
├── src/
│ ├── main_new.rs # Main application entry point
│ ├── config_cli.rs # Configuration CLI tool
│ ├── config.rs # Configuration system (TOML)
│ ├── overlay.rs # WinAPI overlay implementation
│ └── platform/
│ ├── mod.rs # Cross-platform traits
│ └── windows.rs # Windows display/window management
├── Cargo.toml # Rust dependencies
└── target/release/ # Build output
cargo build --release
serde - Configuration serializationtoml - TOML configuration parsingwinapi - Windows API bindingsMIT
Developed by Thomaz Moura with most of the code generated using AI-assisted development tools:
Built with Rust and the Windows API for maximum performance.