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

Allow for automatic line wrapping based on detected console width #1246

Closed
micahellison opened this issue May 15, 2021 · 1 comment · Fixed by #1507
Closed

Allow for automatic line wrapping based on detected console width #1246

micahellison opened this issue May 15, 2021 · 1 comment · Fixed by #1507
Labels
enhancement New feature or request 📌 This can't go stale
Milestone

Comments

@micahellison
Copy link
Member

Feature Request

Use Case/Motivation

Right now, we have a linewrap key in our configure that allows you to specify the max width of a line before wrapping. It's useful for customizing, but it could be automatic instead of manual. Python can detect the user's terminal size and use that.

Example Usage

Perhaps simply having an "auto" value for the linewrap key in the config would be enough:

linewrap: auto

Then jrnl would need to read that key and interpret it appropriately.

Other information

Relevant python function: os.get_terminal_size() would do the trick. However! It is possible for it to fire an exception if there's no terminal (like perhaps in a headless configuration?) so jrnl would need to catch that and revert to a default value for the duration of the program if it fires.

@micahellison micahellison added enhancement New feature or request 🆕 New! labels May 15, 2021
@micahellison micahellison added this to the Backlog milestone May 15, 2021
@micahellison micahellison removed the 🆕 New! label May 15, 2021
@stale
Copy link

stale bot commented Jul 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Jul 17, 2021
@micahellison micahellison added the 📌 This can't go stale label Jul 24, 2021
@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📌 This can't go stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant