prompt-toolkit / prompt-toolkit/python-prompt-toolkit

More minimal frame title?

Open
#2,030 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

Frame formats like this:

┌─| Hello |─┐
│World      │
└───────────┘

Is there a straightforward way to draw a frame without the padding round its title?

┌───Hello───┐
│World      │
└───────────┘

Code for the above:

from prompt_toolkit.application import Application
from prompt_toolkit.layout import Layout, VSplit, Window
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.key_binding.bindings.named_commands import end_of_file
from prompt_toolkit.widgets import Frame, TextArea

kb = KeyBindings()
kb.add("c-c")(end_of_file)

frame = Frame(TextArea(text="World", width=11), title="Hello")
root_container = VSplit([frame, Window()])
layout = Layout(root_container)

app = Application(layout=layout, key_bindings=kb)
app.run()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the provided Python example and inspect the Frame entry point and its title rendering behavior. Determine how the title padding is produced and verify the result against the requested frame output, while preserving the existing padded format by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.