sunsetr v0.4.0 Release Notes
Major Features and Enhancements
Multi-Compositor Backend Support
sunsetr now supports multiple Wayland compositors!
- Universal Wayland Support: Full implementation of
wlr-gamma-control-unstable-v1
protocol for all compatible Wayland compositors - Automatic Backend Detection: Intelligently detects your compositor and uses the appropriate backend
- Zero Configuration Required: Works out-of-the-box on Hyprland, niri, Sway, river, Wayfire, and other Wayland compositors
- Backward Compatibility: Existing Hyprland configurations work unchanged
Enhanced Configuration System
- New
backend
Configuration Field:backend = "auto"
(default) - Automatically detects your compositorbackend = "hyprland"
- Explicitly use Hyprland/hyprsunset backendbackend = "wayland"
- Explicitly use Wayland protocols backend
- Dual Configuration Path Support:
- New preferred location:
~/.config/sunsetr/sunsetr.toml
- Legacy location:
~/.config/hypr/sunsetr.toml
(still supported) - Automatic migration with user choice when both exist
- New preferred location:
- Smart Configuration Validation: Prevents incompatible backend/hyprsunset combinations
Code Architecture Improvements
- Modular Backend System: Clean separation between Hyprland and Wayland implementations
- Progressive Code Migration: Eliminated code duplication while preserving existing functionality
- Enhanced Error Handling: Better error messages with actionable guidance
- Improved Test Coverage: Comprehensive property-based testing for all backend scenarios
Technical Implementation Details
Backend Architecture
- Trait-Based Abstraction:
ColorTemperatureBackend
trait provides unified interface - Zero-Regression Design: Existing Hyprland code moved with identical functionality
- Direct Protocol Communication: Wayland backend communicates directly with compositor protocols
- Multi-Output Support: Full support for multiple monitors on Wayland compositors
Environment Detection Logic
// Detection priority:
1. Explicit configuration (`backend` field)
2. WAYLAND_DISPLAY verification (required)
3. HYPRLAND_INSTANCE_SIGNATURE detection
4. Fallback to appropriate backend
Configuration Enhancements
- Backend-Specific Defaults: Automatically configures appropriate settings per backend
- Validation Logic: Comprehensive validation prevents configuration conflicts
- Migration Support: Seamless transition from legacy configuration locations
Breaking Changes
None! This release maintains 100% backward compatibility:
- Existing configurations work unchanged
- Same command-line interface
- Identical behavior on Hyprland systems
- No performance impact for existing users
New Configuration Options
Backend Selection
# Choose backend explicitly (optional - auto-detection works great!)
backend = "auto" # Default: auto-detect compositor
backend = "hyprland" # Force Hyprland backend
backend = "wayland" # Force Wayland protocols backend
Configuration Path Updates
- New configs will be created at
~/.config/sunsetr/sunsetr.toml
- Existing configs at
~/.config/hypr/sunsetr.toml
continue to work - Interactive migration prompt when both locations have configs
Bug Fixes and Improvements
- Improved Error Messages: Clear, actionable error messages for configuration issues
- Better Environment Validation: Comprehensive checks for Wayland session requirements
- Enhanced Signal Handling: Improved graceful shutdown and cleanup
- Memory Safety: All implementations remain 100% safe Rust with no unsafe blocks
Comprehensive Testing
- Property-Based Testing: Comprehensive testing of all backend combinations
- Multi-Compositor Testing: Verified functionality across different Wayland compositors
- Configuration Validation Testing: All configuration scenarios thoroughly tested
- Zero-Regression Verification: Existing functionality confirmed identical through testing
Documentation Updates
- Updated README: Reflects new multi-compositor support
- Backend Architecture Documentation: Comprehensive technical documentation
- Configuration Guide: Updated with new backend options
- Migration Guide: Guidance for users transitioning configurations
Future Compatibility
This release lays the groundwork for future enhancements:
- Extensible Backend System: Easy to add support for new compositors
- Niri Support Preparation: Architecture ready for niri compositor support
- Additional Protocol Support: Foundation for supporting more Wayland protocols
For Hyprland Users
No changes needed! sunsetr will auto-detect Hyprland and work exactly as before.
For Other Wayland Compositor Users
- Install sunsetr v0.4.0
- Run
sunsetr
- it will auto-detect your compositor - Configuration will be created automatically at
~/.config/sunsetr/sunsetr.toml
Manual Backend Selection (Optional)
If you prefer explicit control:
backend = "wayland" # For Sway, river, Wayfire, etc.
backend = "hyprland" # For Hyprland only
backend = "auto" # Let sunsetr decide (recommended)
Performance and Reliability
- Zero Performance Impact: Same efficient code paths for existing users
- Robust Error Recovery: Enhanced error handling with graceful fallbacks
- Memory Efficient: Minimal memory overhead for backend abstraction
- Fast Startup: Quick backend detection and initialization
🙏 Acknowledgments
This release represents a significant architectural improvement that maintains simplicity and reliability while expanding compatibility. The modular design ensures sunsetr will continue to evolve with the Wayland ecosystem.
Special thanks to the wayland-protocols maintainers, the creator of wlsunset for sharing his color science with an MIT license, and the broader Rust community for making this multi-backend implementation possible.
Installation
From Source
git clone https://github.com/psi4j/sunsetr.git
cd sunsetr
cargo build --release
sudo cp target/release/sunsetr /usr/local/bin/
AUR (Arch Linux)
paru -S sunsetr-bin
Compatibility
- Hyprland >= 0.49.0 (via hyprsunset)
- Sway (via wlr-gamma-control-unstable-v1)
- river (via wlr-gamma-control-unstable-v1)
- Wayfire (via wlr-gamma-control-unstable-v1)
- Other wlr-based compositors with gamma control support
Full Changelog: v0.3.0...v0.4.0