Skip to content

Let the editor fill the window, with a configurable measure - #24

Open
x3m wants to merge 1 commit into
omacom:masterfrom
x3m:configurable-line-length
Open

Let the editor fill the window, with a configurable measure#24
x3m wants to merge 1 commit into
omacom:masterfrom
x3m:configurable-line-length

Conversation

@x3m

@x3m x3m commented Aug 25, 2026

Copy link
Copy Markdown

The editor measure is hardcoded at 65 average character widths. That is a classic default for prose, but on a large display most of the window is empty margin, and notes with long list items (meeting minutes, task lists) wrap early. It also caps information density: combined with text-size shortcuts (#25), shrinking the font just shrinks the column — you never fit more text per line.

This lets the text use the window instead:

  • By default the editor fills the available width, keeping the existing ten characters of margin on either side (the width - 20ch term that already existed).
  • The classic fixed measure stays available via the existing QSettings store: [layout] editorColumns in omawrite.conf0 (default) fills the window; a positive value gives a fixed measure (clamped ≥20, still capped by window width); 65 restores today's look exactly. No new UI.

To be upfront: this changes the default look — the column is wider on large windows. If you'd rather keep 65 as the default, the same patch works with the default flipped; happy to adjust.

Tested on Omarchy (Qt 6.11) in both modes, including the interplay with #25 (smaller font → more characters per line when filling the window).

🤖 Generated with Claude Code

https://claude.ai/code/session_01D5cK4VRT6nuLGuwEJrZvRD

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes the editor fill the available window width by default while preserving a configurable fixed-column measure.

  • Adds a persistent [layout] editorColumns setting with bounded fixed-width behavior.
  • Raises the documented and packaged minimum Qt version to 6.5 for the QtCore Settings QML type.
  • Updates the editor-width calculation while preserving margins and the classic 65-column option.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/Main.qml Adds persistent editor-column configuration and switches the default measure to the bounded available window width.
omawrite.pro Enforces Qt 6.5 or newer at qmake configuration time for the new QtCore Settings dependency.
pkgbuild/PKGBUILD Aligns Arch build and runtime Qt package version constraints with the new minimum.
README.md Documents the Qt 6.5 minimum required by the updated QML interface.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    S[Read layout/editorColumns] --> C{Value greater than 0?}
    C -- No --> A[Use available window width]
    C -- Yes --> F[Clamp to at least 20 columns]
    F --> M[Cap at available window width]
    A --> E[Set editor width]
    M --> E
Loading

Reviews (4): Last reviewed commit: "Let the editor fill the window, with a c..." | Re-trigger Greptile

@x3m
x3m force-pushed the configurable-line-length branch from 63e2b48 to 3bed051 Compare August 25, 2026 09:07
@x3m x3m changed the title Make the editor line length configurable Let the editor fill the window, with a configurable measure Aug 25, 2026
@x3m
x3m force-pushed the configurable-line-length branch from 3bed051 to 84dff04 Compare August 25, 2026 09:30
The editor measure is hardcoded at 65 average character widths, so on a
large display most of the window is empty margin, and long list items
(meeting minutes, task lists) wrap early. It also caps information
density: once text-size shortcuts exist, shrinking the font just shrinks
the column instead of fitting more text per line.

Let the text use the window instead: the editor now fills the available
width, keeping the existing ten characters of margin on either side. The
classic fixed measure remains available through the QSettings store —
[layout] editorColumns in omawrite.conf, where 0 (the default) means fill
the window and a positive value (clamped to at least 20, still capped by
the window width) gives a fixed measure; 65 restores the previous look
exactly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5cK4VRT6nuLGuwEJrZvRD
@x3m
x3m force-pushed the configurable-line-length branch from 84dff04 to a7c79a0 Compare August 25, 2026 10:26
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