mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-25 01:46:02 +00:00
Standardise on a grey
This commit is contained in:
parent
0a1d3f56ec
commit
44628ba6e2
@ -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
|
||||
|
10
src/file.rs
10
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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user