diff options
author | rabite <rabite@posteo.de> | 2019-02-06 00:55:10 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-02-06 00:55:10 +0100 |
commit | 8c2c1c0bab46518ea95e8eaf400faaddad1ef93d (patch) | |
tree | 6c25ef733dea9b3ba903be17b6dacbdfe0f4f20a /src/term.rs | |
parent | 09b50562ece43e6b8dc202def224b521268ad875 (diff) |
show file stats at bottom
Diffstat (limited to 'src/term.rs')
-rw-r--r-- | src/term.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/term.rs b/src/term.rs index bbd8806..950a410 100644 --- a/src/term.rs +++ b/src/term.rs @@ -55,6 +55,18 @@ pub fn normal_color() -> String { ) } +pub fn color_red() -> String { + format!("{}", termion::color::Fg(termion::color::Red)) +} + +pub fn color_yellow() -> String { + format!("{}", termion::color::Fg(termion::color::Yellow)) +} + +pub fn color_green() -> String { + format!("{}", termion::color::Fg(termion::color::Green)) +} + pub fn from_lscolor(color: &lscolors::Color) -> String { match color { lscolors::Color::Black => format!("{}", termion::color::Fg(termion::color::Black)), @@ -69,9 +81,9 @@ pub fn from_lscolor(color: &lscolors::Color) -> String { } } -pub fn cursor_left(n: u16) -> String { - format!("{}", termion::cursor::Left(n)) -} +// pub fn cursor_left(n: u16) -> String { +// format!("{}", termion::cursor::Left(n)) +// } pub fn gotoy(y: u16) -> String { format!("{}", termion::cursor::Goto(1, y)) |