Skip to content

Feature request: width of terminal in number of characters #482

@wrinklykong

Description

@wrinklykong

Summary

To my knowledge there is no way to determine the # of characters the terminal can support at one time. It would be nice to have a simple Terminal.width property which could tell us this information

My current jank fix

Grab the client width of the terminal and divide by 12 (12 seemed to be the sweet spot, not sure if this is specific to my machine or not)

    function get_max_number_of_characters () {
        const width = document.getElementById('terminal_container').clientWidth
        const max_number = Math.floor(width / 12)
        return max_number
    }

Results:

Really cool stuff!
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions