Skip to content

Implement multiple configuration profile support#5

Merged
dillacorn merged 1 commit into
dillacorn:mainfrom
soltros:main
Dec 4, 2025
Merged

Implement multiple configuration profile support#5
dillacorn merged 1 commit into
dillacorn:mainfrom
soltros:main

Conversation

@soltros

@soltros soltros commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Implements a comprehensive multi-profile configuration system that allows
users to maintain multiple named configurations for different gaming
scenarios (e.g., different monitors, HDR/SDR setups, aspect ratios).

Key Features:

  • Named configuration profiles stored in ~/.config/smtty/profiles/
  • Profile management commands: -c (use), -L (list), -D (delete)
  • Interactive profile selection and creation
  • Automatic migration of existing single config to "default" profile
  • Profile name validation and duplicate handling
  • Last-used profile tracking for -l flag

New Flags:

  • -c <profile>: Load and use specific profile immediately
  • -L: List all available configuration profiles
  • -D <profile>: Delete specified profile with confirmation

Modified Behavior:

  • -n: Now prompts for profile name when creating config
  • -l: Uses tracked last profile instead of generic config
  • Default mode: Offers interactive menu to choose/create profiles

Implementation Details:

  • Added ~350 lines of new profile management code
  • 6 new functions for profile operations
  • Maintains full backward compatibility
  • Automatic legacy config migration on first run
  • All existing flags and features work unchanged

Use Cases:

  • Multiple monitors with different settings per output
  • HDR vs SDR profiles for different times of day
  • Native vs stretched aspect ratios for different game types
  • Different audio output configurations (headphones/speakers)

Example Usage:
smtty -n # Create new profile (prompts for name)
smtty -c gaming # Launch with 'gaming' profile
smtty -L # List all profiles
smtty -D old-config # Delete 'old-config' profile

Breaking Changes: None

  • Existing single config automatically migrated to "default" profile
  • All original functionality preserved
  • Original config file preserved during migration

Added support for multiple configuration profiles, including options to create, list, and delete profiles. Updated help documentation and migrated legacy single config to a default profile.
@dillacorn

dillacorn commented Dec 3, 2025

Copy link
Copy Markdown
Owner

Yeah, I knew this was something I needed to add. Thanks, you probably saved me a lot of time and headache patching this in.

I’ll do multiple rounds of testing to confirm it is solid before merging to main. I don’t think it’s necessary to tag so many things as “NEW” or call out that the config was modified, so I’ll keep this commit, then follow up with another one that cleans up that extra text.

Also ran a shellcheck and have an issue at line # 1812

I fixed that issue myself.. Going to test later

@dillacorn dillacorn closed this Dec 3, 2025
@dillacorn dillacorn reopened this Dec 3, 2025
@dillacorn dillacorn merged commit 83bab47 into dillacorn:main Dec 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants