feat: add interactive font, size, and opacity selectors with live preview - #270
Open
BuberryWorldwide wants to merge 1 commit into
Open
Conversation
…view New features: - Interactive font selector (-S/--select-font) with live preview - Shows monospace fonts by default, use --all for all fonts - Uses system's fc-list to enumerate available fonts - Interactive font size selector (-Z/--select-size) with live preview - Interactive opacity selector (-O/--select-opacity) with live preview - Direct setters: -f/--font, -s/--size, -o/--opacity - Show current settings with -F/--font-info (now includes opacity) Technical improvements: - Use synchronous file writes during preview to prevent race conditions - Add validation for empty/corrupted config files - Use YAML setIn() method for cleaner nested value updates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds interactive selectors for fonts, font sizes, and window opacity - all with live preview as you scroll through options, similar to how the theme selector already works.
New Commands
Interactive selectors (with live preview):
alacritty-themes -S/--select-font- Select font from system fonts (monospace only by default)alacritty-themes -S --all- Select from all system fontsalacritty-themes -Z/--select-size- Select font sizealacritty-themes -O/--select-opacity- Select window opacityDirect setters:
alacritty-themes -s 14/--size 14- Set font size directlyalacritty-themes -f "JetBrains Mono"/--font "..."- Set font family directlyalacritty-themes -o 0.9/--opacity 0.9- Set opacity directlyInfo:
alacritty-themes -F/--font-info- Show current font family, size, and opacityTechnical Changes
fc-listto enumerate system fonts (Linux)setIn()method for cleaner nested value updatesDemo
The selectors work just like the existing theme selector - arrow keys to navigate, type to filter, Enter to confirm. Changes preview live as you scroll.