0

I'm trying to make a nice looking terminal game, but a lot of the things i'd like to do need a constant screen size. So i need the program to request a certain size every time it is ran. Is this possible, if so how?

Blackbinary
  • 3,936
  • 18
  • 49
  • 62

2 Answers2

1

The ncurses library has functionality for handling terminal sizes. This has been answered here and here regarding terminal dimensions.

Community
  • 1
  • 1
krs1
  • 1,125
  • 7
  • 16
0

You can only get the existing size, but you can't ask for a specific size. This terminal stuff was invented in a time where these sizes where hardcoded to be the physical size of the screen.

Uli Schlachter
  • 9,337
  • 1
  • 23
  • 39