Files
Inorishio 51811d4f57 Add hot-reload config support to detect and apply changes without restart
- Create ConfigWatcher module to monitor config.toml for modifications
- Add get_config_path() to consistently determine config file location
- Implement hot-reload detection in update() that checks for file changes each frame
- Add apply_config_changes() method to handle config updates gracefully
- Add PartialEq derive to all config structs to enable change detection
- Config changes now apply immediately without requiring app restart
- Background opacity, colors, text sizing, and other settings update live
- Log all detected changes for debugging and user awareness
- Fixes issue where config.toml changes were only applied when running from cargo run
2026-02-06 12:23:28 +01:00

76 lines
2.4 KiB
TOML

[window]
width = 1024.0
height = 768.0
min_width = 800.0
min_height = 600.0
use_transparency = true
position_offset_x = 0.0
position_offset_y = -30.0
[text_sizing]
# Font sizes for different text elements (in pixels)
heading = 20.0 # Section headers
body = 16.0 # Regular text
small = 14.0 # Small text (hints, labels)
button = 20.0 # Button text
[azure]
# Azure-specific configuration
secret_expiration_years = 50 # How many years until created secrets expire (default: 50)
[appearance]
# Leave empty to use embedded default background, or specify custom path
# Examples: "./assets/background.jpg", "C:/path/to/image.png"
background_image = "./assets/background.jpg"
background_opacity = 0.8
fallback_color_opacity = 0.4
background_blur = 0.0
fallback_color = [30, 30, 40] # Used if image fails to load
[colors.text]
# Text colors for different states (applies to card titles, labels, etc.)
normal = [255, 255, 255]
inactive = [255, 255, 255]
hover = [255, 255, 255]
select = [80, 150, 255]
[colors.slider]
# Slider/scrollbar colors for different states
inactive = [239, 124, 0]
hover = [255, 124, 0]
active = [255, 124, 0]
[colors.widget_borders]
# Widget border colors for textboxes, buttons, etc.
# Controls the outline/stroke around interactive elements
inactive = [60, 60, 70] # Noninteractive and inactive states
hover = [120, 120, 140] # When hovering over widget
active = [120, 120, 140] # When clicking/interacting with widget
[colors.warning]
# Warning message colors
text = [255, 200, 100] # Warning text color (amber/orange)
background = [80, 60, 30] # Warning box background color
[colors.info_box]
# Information box colors (for secret details display)
background = [40, 40, 60] # Info box background color
border = [239, 124, 0] # Info box border color (orange)
[colors.create_secret_info]
# Info box on "Create Secret" screen (shows "Creating secret for: X")
background = [40, 40, 60] # Info box background color (purple/dark blue)
text = [239, 124, 0] # Info box text color (light blue/lavender)
[colors.cards.app_list]
# App list card colors (RGBA format - last value is alpha/transparency)
selected_bg = [179, 87, 0, 180]
selected_border = [255, 124, 0]
unselected_bg = [40, 40, 60, 150]
[colors.cards.keyvault]
# Key vault card colors (RGBA format - last value is alpha/transparency)
selected_bg = [179, 87, 0, 180]
selected_border = [255, 124, 0]
unselected_bg = [40, 40, 60, 150]