Sunsetr v0.10.0
This release brings useful configuration management capabilities with new CLI commands, native Hyprland CTM backend support, and significant improvements to user experience through enhanced help systems and error handling. The codebase has undergone substantial backend refactoring to improve maintainability and prepare for future enhancements.
New Features
Configuration Management Commands
- New
getcommand for reading configuration values programmatically - Supports JSON output format for scripting and automation
- Can target specific configurations (default or named presets)
- Retrieve single fields, multiple fields, or entire configuration
Usage: Read configuration values from the command line:
# Get specific fields
sunsetr get night_temp # Returns: night_temp = 3300
sunsetr get night_temp day_temp # Multiple fields at once
# Get entire configuration
sunsetr get all
# JSON output for scripting
sunsetr get --json night_temp # Returns: {"night_temp": 3300}
sunsetr get --json all
# Target specific configurations
sunsetr get --target default night_temp # From base config
sunsetr get -t gaming static_temp # From gaming presetConfiguration Modification Command
- New
setcommand for modifying configuration fields from CLI - Validates all values before saving
- Shows warnings for potentially problematic changes
- Preserves configuration structure and comments
- Supports targeting specific configurations (default or presets)
Usage: Modify configuration values safely:
# Set configuration values
sunsetr set night_temp=3500 # Update night temperature
sunsetr set night_temp=3500 day_temp=6000 # Multiple values at once
# Target specific configurations
sunsetr set --target default night_temp=3500 # Modify base config
sunsetr set -t gaming static_temp=4700 # Modify gaming presetThe set command includes interactive warnings when editing preset configurations to prevent accidental changes.
Enhanced Preset System
- New subcommands for the preset command
preset activeshows the currently active presetpreset listdisplays all available presets- Improved preset switching logic and error handling
Usage:
# Show currently active preset
sunsetr preset active # or 'sunsetr p active'
# List all available presets
sunsetr preset list # or 'sunsetr p list'Native Hyprland CTM Backend
- New native Color Transformation Matrix backend for Hyprland
- Eliminates dependency on hyprsunset for compatible Hyprland versions
- Direct protocol communication using hyprland-ctm-control-v1
- Maintains backward compatibility with hyprsunset backend option
Configuration: The backend system now supports four options:
backend = "auto" # Auto-detect (recommended)
backend = "hyprland" # Native CTM backend
backend = "hyprsunset" # Use hyprsunset as dependency
backend = "wayland" # Universal Wayland backendNotes:
- The
start_hyprsunsetfield is deprecated and no longer has any effect if used. To use hyprsunset as a backend, usebackend = "hyprsunset". Starting hyprsunset separately is no longer supported as of v0.10.0. I have no idea why you would do this anyways. - Use the Wayland backend to use sunsetr's smooth transitions enabled with
smoothing = true. - The native Hyprland backend and Hyprsunset backend use Hyprland's built-in CTM animations instead. To disable these animations, add to
hyprland.conf:
render {
ctm_animation = 0
}Comprehensive Help System
- New
helpcommand provides detailed documentation for all commands - Command-specific help pages with usage examples
- Short aliases supported (e.g.,
sunsetr h pfor preset help) - Improved --help output with better organization
Usage:
# General help
sunsetr help # Show all available commands
sunsetr --help # Show detailed usage information
# Command-specific help
sunsetr help preset # Detailed help for preset command
sunsetr help set # Detailed help for set command
sunsetr help get # Detailed help for get commandXDG Base Directory Support
- State management now follows XDG Base Directory specification
- Display state tracking moved to
$XDG_RUNTIME_DIR/sunsetr/ - Better organization of runtime files and state
- Improved privacy for path displays in logs
Technical Improvements
Backend Architecture Refactoring
- Split Hyprland backend into separate hyprsunset and native CTM implementations
- Moved gamma calculation logic to shared module
- Improved backend trait design for better extensibility
- Enhanced debug output for all backends
- Better error handling and recovery mechanisms
Enhanced Error Handling
- Standardized error severity levels across all commands
- Colored severity indicators in terminal output
- Cleaner multi-line error formatting
- Better user guidance with actionable error messages
- Privacy-preserving path displays in error output
Logger Improvements
- Simplified logger format for cleaner aesthetic
- Colored severity levels (red for errors, yellow for warnings)
- Improved spacing and indentation
- Better handling of multi-line output
- Consistent formatting across all commands
Bug Fixes
- Fixed config directory handling when using
--configflag with commands - Corrected privacy path display in watcher module
- Improved error propagation in CLI argument parsing
- Resolved issues with preset state tracking across commands