diff options
author | Canop <cano.petrole@gmail.com> | 2018-12-01 09:45:48 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2018-12-01 09:45:48 +0100 |
commit | 3010225730f968b2d1cd562f1bf358076ad096ec (patch) | |
tree | b0d77988d4d3061303dab9ca8dde952559c20340 /src/screens.rs | |
parent | f1ef7984cbf91277560a91938b34fa5ca97892cc (diff) |
specializable application states
So that I can have screens for conf, help, etc.
Diffstat (limited to 'src/screens.rs')
-rw-r--r-- | src/screens.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/screens.rs b/src/screens.rs index df829ac..f17f0ed 100644 --- a/src/screens.rs +++ b/src/screens.rs @@ -21,3 +21,9 @@ impl Drop for Screen { write!(self.stdout, "{}", termion::cursor::Show).unwrap(); } } + +pub fn max_tree_height() -> u16 { + let (_, h) = termion::terminal_size().unwrap(); + h - 2 +} + |