Skip to content

100% width doesn't work on MacOS, always 80 chars wide #51

@mrjones-plip

Description

@mrjones-plip

Intro

Hi there! I'm really pleased with bashsimplecurses - thank you!! I've just launched a tool that uses it and we're seeing that MacOS users do not get a full width window when running a script that declares window "100% wide window" "red" "100%" Instead an 80 char wide window is shown. Since our script displays information that some times is wider than 80 chars, it'd be great if bashsimplecurses supported full width on MacOS.

Steps to reproduce

  1. Be on MacOS - tested on 10.13.6 and 11.x & in ohmyzsh, bash and sh
  2. Clone this repo (as of 054a04a)
  3. cd into ./bashsimplecurses/examples
  4. Create a file called macos.sh with this contents:
    #!/bin/bash
    . `dirname $0`/../simple_curses.sh
    main (){
        window "100% wide window" "red" "100%"
        append "`date`"
        endwin
    }
    main_loop -t 0.5 "$@"
  5. Run chmod +x macos.sh&& ./macos.sh

Expected: Window is shown full width of current terminal
Actual: Window is always shown at 80 chars wide, no bigger, no smaller

Related - setting it to 50% in the script seems to show it at 40 chars wide ( i guess half of the 80 chars it thinks the terminal always is)

Screenshots

Here's a local shell on Ubuntu 20.04/ohmyzsh on the top and and SSH shell on macos/ohmyzsh on the bottom. The first shows a screen ~107 chars wide, the second shows one ~40 chars wide:

too narrow
too wide

Here's the same script running on in a local shell on MacOS:

native mac os

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions