Skip to content

feat: add interactive font, size, and opacity selectors with live preview - #270

Open
BuberryWorldwide wants to merge 1 commit into
rajasegar:masterfrom
BuberryWorldwide:feature/font-and-opacity-selectors
Open

feat: add interactive font, size, and opacity selectors with live preview#270
BuberryWorldwide wants to merge 1 commit into
rajasegar:masterfrom
BuberryWorldwide:feature/font-and-opacity-selectors

Conversation

@BuberryWorldwide

@BuberryWorldwide BuberryWorldwide commented Jan 20, 2026

Copy link
Copy Markdown

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 fonts
  • alacritty-themes -Z / --select-size - Select font size
  • alacritty-themes -O / --select-opacity - Select window opacity

Direct setters:

  • alacritty-themes -s 14 / --size 14 - Set font size directly
  • alacritty-themes -f "JetBrains Mono" / --font "..." - Set font family directly
  • alacritty-themes -o 0.9 / --opacity 0.9 - Set opacity directly

Info:

  • alacritty-themes -F / --font-info - Show current font family, size, and opacity

Technical Changes

  • Uses fc-list to enumerate system fonts (Linux)
  • Synchronous file writes during preview to prevent race conditions
  • Validation for empty/corrupted config files
  • Uses YAML setIn() method for cleaner nested value updates

Demo

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.

…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>
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.

1 participant