diff --git a/src/colours.rs b/src/colours.rs index 3f5bd57..edd4305 100644 --- a/src/colours.rs +++ b/src/colours.rs @@ -46,6 +46,8 @@ impl Colour { } } +pub static Grey: Colour = Fixed(244); + // There are only three different styles: plain (no formatting), only // a foreground colour, and a catch-all for anything more complicated // than that. It's technically possible to write other cases such as diff --git a/src/file.rs b/src/file.rs index 4e78add..ebfbe31 100644 --- a/src/file.rs +++ b/src/file.rs @@ -1,4 +1,4 @@ -use colours::{Plain, Style, Black, Red, Green, Yellow, Blue, Purple, Cyan, Fixed}; +use colours::{Plain, Style, Red, Green, Yellow, Blue, Purple, Cyan, Grey}; use std::io::{fs, IoResult}; use std::io; use std::str::from_utf8_lossy; @@ -115,7 +115,7 @@ impl<'a> File<'a> { Cyan.paint(self.stat.unstable.blocks.to_str().as_slice()) } else { - Fixed(244).paint("-") + Grey.paint("-") } }, @@ -175,7 +175,7 @@ impl<'a> File<'a> { // that reason anyway. match link_target { - Ok(file) => format!("{} {}", Fixed(244).paint("=>"), file.file_colour().paint(filename.as_slice())), + Ok(file) => format!("{} {}", Grey.paint("=>"), file.file_colour().paint(filename.as_slice())), Err(_) => format!("{} {}", Red.paint("=>"), Red.underline().paint(filename.as_slice())), } } @@ -184,7 +184,7 @@ impl<'a> File<'a> { // Don't report file sizes for directories. I've never looked // at one of those numbers and gained any information from it. if self.stat.kind == io::TypeDirectory { - Fixed(244).paint("-") + Grey.paint("-") } else { let (size, suffix) = if use_iec_prefixes { format_IEC_bytes(self.stat.size) @@ -234,7 +234,7 @@ impl<'a> File<'a> { if bits.contains(bit) { style.paint(character.as_slice()) } else { - Black.bold().paint("-".as_slice()) + Grey.paint("-".as_slice()) } } } diff --git a/src/filetype.rs b/src/filetype.rs index 5557fa9..d6e2ef0 100644 --- a/src/filetype.rs +++ b/src/filetype.rs @@ -1,4 +1,4 @@ -use colours::{Plain, Style, Red, Green, Yellow, Blue, Cyan, Fixed}; +use colours::{Plain, Style, Red, Green, Yellow, Blue, Cyan, Grey, Fixed}; use file::File; use std::io; @@ -60,7 +60,7 @@ impl FileType { Crypto => Fixed(109).normal(), Document => Fixed(105).normal(), Compressed => Red.normal(), - Temp => Fixed(244).normal(), + Temp => Grey.normal(), Immediate => Yellow.bold().underline(), Compiled => Fixed(137).normal(), }