summaryrefslogtreecommitdiffstats
path: root/src/theme/color.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/theme/color.rs')
-rw-r--r--src/theme/color.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/theme/color.rs b/src/theme/color.rs
index 3f32758..4267b20 100644
--- a/src/theme/color.rs
+++ b/src/theme/color.rs
@@ -89,6 +89,7 @@ pub struct ColorTheme {
#[serde(deserialize_with = "deserialize_color")]
pub group: Color,
pub permission: Permission,
+ pub attributes: Attributes,
pub date: Date,
pub size: Size,
pub inode: INode,
@@ -128,6 +129,21 @@ pub struct Permission {
#[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)]
#[serde(default)]
+pub struct Attributes {
+ #[serde(deserialize_with = "deserialize_color")]
+ pub archive: Color,
+ #[serde(deserialize_with = "deserialize_color")]
+ pub read: Color,
+ #[serde(deserialize_with = "deserialize_color")]
+ pub hidden: Color,
+ #[serde(deserialize_with = "deserialize_color")]
+ pub system: Color,
+}
+
+#[derive(Debug, Deserialize, PartialEq, Eq)]
+#[serde(rename_all = "kebab-case")]
+#[serde(deny_unknown_fields)]
+#[serde(default)]
pub struct FileType {
pub file: File,
pub dir: Dir,
@@ -274,6 +290,16 @@ impl Default for Permission {
}
}
}
+impl Default for Attributes {
+ fn default() -> Self {
+ Attributes {
+ archive: Color::DarkGreen,
+ read: Color::DarkYellow,
+ hidden: Color::AnsiValue(13), // Pink,
+ system: Color::AnsiValue(13), // Pink,
+ }
+ }
+}
impl Default for FileType {
fn default() -> Self {
FileType {
@@ -381,6 +407,7 @@ impl ColorTheme {
user: Color::AnsiValue(230), // Cornsilk1
group: Color::AnsiValue(187), // LightYellow3
permission: Permission::default(),
+ attributes: Attributes::default(),
file_type: FileType::default(),
date: Date::default(),
size: Size::default(),