summaryrefslogtreecommitdiffstats
path: root/src/mad_skin.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2019-12-14 08:00:43 +0100
committerCanop <cano.petrole@gmail.com>2019-12-14 08:12:25 +0100
commit94722132169e6d306bfbcbe19f8f1b4b8febed91 (patch)
tree7aa859a6dd4f2287479b4c40df3e7bd6cac8ceea /src/mad_skin.rs
parent036641f101c02221e492318c679899d7ae5b7c8f (diff)
rewrite br shell function installation to comply with #53 and #39
Everybody has its own idea about where config files should be stored. I probably spent way too much time there. But there it is. Fixes #39 Fixes #53
Diffstat (limited to 'src/mad_skin.rs')
-rw-r--r--src/mad_skin.rs35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/mad_skin.rs b/src/mad_skin.rs
index f36272a..240e140 100644
--- a/src/mad_skin.rs
+++ b/src/mad_skin.rs
@@ -1,14 +1,19 @@
/// This module builds Termimad `MadSkin` from Broot `Skin`
-use termimad::{
- CompoundStyle,
- Alignment,
- LineStyle,
- MadSkin,
-};
-
-use crate::{
- skin::Skin,
+use {
+ crate::{
+ skin::Skin,
+ },
+ crossterm::{
+ style::Color,
+ },
+ termimad::{
+ Alignment,
+ CompoundStyle,
+ LineStyle,
+ gray,
+ MadSkin,
+ },
};
/// the mad skin applying to the status depending whether it's an
@@ -83,3 +88,15 @@ pub fn make_help_mad_skin(skin: &Skin) -> MadSkin {
.set_compound_style(CompoundStyle::from(skin.scrollbar_thumb.clone()));
ms
}
+
+/// build a termimad skin for cli output (mostly
+/// for the install process)
+pub fn make_cli_mad_skin() -> MadSkin {
+ let mut skin = MadSkin::default();
+ skin.set_headers_fg(Color::AnsiValue(178));
+ skin.bold.set_fg(Color::Yellow);
+ skin.code_block.set_bg(gray(2));
+ skin.code_block.set_fg(gray(18));
+ skin.italic.set_fg(Color::Magenta);
+ skin
+}