about summary refs log tree commit diff stats
path: root/src/utils/termattrs.nim
blob: d49800aea952f6fb50361b22f0319db0c77cc97d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import terminal

type
  TermAttributes* = object
    termWidth*: int
    termHeight*: int

proc getTermAttributes*(): TermAttributes =
  let attrs = TermAttributes(termWidth: terminalWidth(),
                             termHeight: terminalHeight())
  return attrs