Skip to content

Show README install flags in two columns - #101

Merged
adamXbot merged 1 commit into
mainfrom
ui/flag-columns
Nov 10, 2026
Merged

adamXbot merged 1 commit into
mainfrom
ui/flag-columns

Conversation

@adamXbot

Copy link
Copy Markdown
Collaborator

What it does

fxcss try --info lists the install flags a theme's README documents. A long list now sits in two columns, so 14 flags take 7 rows instead of 15:

  README install flags  as the README words them, for its own script; fxcss never runs it
    -c  Left hand side tab close button          -v         Re-enables the tabview button
    -w  Left hand side window close button       -e         Hides the extension button
    -p  Makes tabs height compact like…          -s         Single tab view (Tabs hidden when…
    -f  To specify the default firefox…          -t <name>  Colour theme (see Colour themes below)
    -l  Default location of most Linux…          -i         Increase contrast (see Colour themes…
    -u  Remove the animation on URL bar to…      -a         Highlight the selected tab (see…
    -n  Removes the identity colour from tabs    -r         Remove the theme
  • Order. Flags keep the README's order, down the left column and then the right.
  • Cuts. A description is cut between words, and only when the two columns run out of room. A column that needs less than half gives the rest to the other.
  • Unchanged cases. A list of fewer than 6 flags, or a terminal too narrow to give each description about 24 columns, keeps one flag to a row in full.

Changes

  • style.paired_columns(): key text pairs in two columns, or None when they are too tight.
  • cli._flag_lines(): chooses between the two layouts.

Test plan

  • python3 -m unittest discover -s tests: 802 tests, 1 skipped (Python 3.14), also inside a pseudo-terminal. The new tests also pass on 3.9.
  • New tests/test_flag_columns.py covers:
    • half the rows, in the order given, with each column lined up;
    • nothing reaching the terminal edge from 72 to 110 columns;
    • cuts between words, and text that fits left whole;
    • spare room passing to the other column;
    • colour changing no words or spacing;
    • try --info with a long list, a short list and a narrow terminal.
  • Run fxcss try <theme> --info on a theme whose README lists install flags.

🤖 Generated with Claude Code

A long list of README install flags in try --info now sits in two
columns, in the README's order, so 14 flags take 7 rows. Descriptions
are cut between words, and only when the columns run out of room.

A list of fewer than 6 flags, or a terminal too narrow to give each
description about 24 columns, keeps one flag to a row in full.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamXbot
adamXbot merged commit 5417088 into main Nov 10, 2026
20 checks passed
@adamXbot
adamXbot deleted the ui/flag-columns branch November 10, 2026 06:10
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