Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add termenv's SetWindowTitle to BubbleTea? #610

Closed
erwin opened this issue Nov 21, 2022 · 2 comments · Fixed by #611
Closed

Add termenv's SetWindowTitle to BubbleTea? #610

erwin opened this issue Nov 21, 2022 · 2 comments · Fixed by #611
Labels
enhancement New feature or request

Comments

@erwin
Copy link

erwin commented Nov 21, 2022

In BubbleTea there are wrappers for many of escape sequences that termenv provides (show/hide cursor, enter/exit alt screen, clearScreen).

I think it would be also be nice to include termenvs SetWindowTitle in BubbleTea.

It's easy enough to just output the escape codes to switch the title in your view, but I think adding this one would be in the spirit of the rest of BubbleTea.

"\x1b]2;" + YourTitle + "\a" 

Ideally I would like to trigger title changes periodically based on important state changes identified during Update() rather than splicing it into the View.

@meowgorithm
Copy link
Member

meowgorithm commented Nov 21, 2022

Yep, this is a feature we’d like to add. Because of the i/o involved it should be implemented as a Cmd.

@meowgorithm meowgorithm added the enhancement New feature or request label Nov 21, 2022
aymanbagabas added a commit that referenced this issue Nov 21, 2022
Set the terminal window title using termenv.

Fixes: #610
aymanbagabas added a commit that referenced this issue Nov 21, 2022
Set the terminal window title using termenv.

Fixes: #610
aymanbagabas added a commit that referenced this issue Nov 21, 2022
Set the terminal window title using termenv.

Fixes: #610
aymanbagabas added a commit that referenced this issue Dec 4, 2023
Set the terminal window title using termenv.

Fixes: #610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@meowgorithm @erwin and others