From 5366888dff693316ec9ac8f799e64144ee4668bf Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 2 Jun 2020 18:26:44 +0300 Subject: [PATCH] Add samples/ directory with config and themes --- sample-config => samples/sample-config.toml | 0 samples/themes/spooky.toml | 44 +++++++++++++++++++ samples/themes/watermelon.toml | 48 +++++++++++++++++++++ src/conf.rs | 2 +- 4 files changed, 93 insertions(+), 1 deletion(-) rename sample-config => samples/sample-config.toml (100%) create mode 100644 samples/themes/spooky.toml create mode 100644 samples/themes/watermelon.toml diff --git a/sample-config b/samples/sample-config.toml similarity index 100% rename from sample-config rename to samples/sample-config.toml diff --git a/samples/themes/spooky.toml b/samples/themes/spooky.toml new file mode 100644 index 00000000..b04ed06a --- /dev/null +++ b/samples/themes/spooky.toml @@ -0,0 +1,44 @@ +[terminal.themes.spooky] +"theme_default" = { fg = "#333", bg = "#fe9b13", attrs = "Default" } +"mail.listing.attachment_flag" = { fg = "LightSlateGrey", bg = "theme_default", attrs = "theme_default" } +"mail.listing.compact.even" = { fg = "theme_default", bg = "#bf200e", attrs = "theme_default" } +"mail.listing.compact.odd" = { fg = "theme_default", bg = "#fa4113", attrs = "theme_default" } +"mail.listing.compact.even_highlighted" = { fg = "theme_default", bg = "Yellow6", attrs = "theme_default" } +"mail.listing.compact.odd_highlighted" = { fg = "theme_default", bg = "Yellow6", attrs = "theme_default" } +"mail.listing.compact.even_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.compact.odd_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.compact.even_unseen" = { fg = "Black", bg = "Orange3", attrs = "theme_default" } +"mail.listing.compact.odd_unseen" = { fg = "Black", bg = "Orange3", attrs = "theme_default" } +"mail.listing.conversations.date" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations.from" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations.highlighted" = { fg = "theme_default", bg = "Grey58", attrs = "theme_default" } +"mail.listing.conversations.padding" = { fg = "Grey15", bg = "Grey15", attrs = "theme_default" } +"mail.listing.conversations.selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.conversations.subject" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations.unseen" = { fg = "Black", bg = "Grey78", attrs = "theme_default" } +"mail.listing.conversations.unseen_padding" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.even" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.odd" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.even_unseen" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.odd_unseen" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.even_highlighted" = { fg = "theme_default", bg = "Yellow6", attrs = "theme_default" } +"mail.listing.plain.odd_highlighted" = { fg = "theme_default", bg = "Yellow6", attrs = "theme_default" } +"mail.listing.plain.even_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.plain.odd_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.thread_snooze_flag" = { fg = "Red", bg = "theme_default", attrs = "theme_default" } +"mail.sidebar" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.sidebar_highlighted_account" = { fg = "White", bg = "Orange3", attrs = "theme_default" } +"mail.sidebar_highlighted_account_index" = { fg = "mail.sidebar_index", bg = "mail.sidebar_highlighted_account", attrs = "theme_default" } +"mail.sidebar_highlighted_account_unread_count" = { fg = "mail.sidebar_unread_count", bg = "mail.sidebar_highlighted_account", attrs = "theme_default" } +"mail.sidebar_highlighted" = { fg = "Grey7", bg = "White", attrs = "theme_default" } +"mail.sidebar_highlighted_index" = { fg = "mail.sidebar_index", bg = "mail.sidebar_highlighted", attrs = "theme_default" } +"mail.sidebar_highlighted_unread_count" = { fg = "mail.sidebar_highlighted", bg = "mail.sidebar_highlighted", attrs = "theme_default" } +"mail.sidebar_index" = { fg = "Grey46", bg = "theme_default", attrs = "theme_default" } +"mail.sidebar_unread_count" = { fg = "Grey46", bg = "theme_default", attrs = "theme_default" } +"mail.view.body" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.view.headers" = { fg = "DodgerBlue1", bg = "theme_default", attrs = "theme_default" } +"status.bar" = { fg = "White", bg = "#A21500", attrs = "theme_default" } +"tab.bar" = { fg = "theme_default", bg = "#332300", attrs = "theme_default" } +"tab.unfocused" = { fg = "theme_default", bg = "#A26F00", attrs = "theme_default" } +"tab.focused" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } diff --git a/samples/themes/watermelon.toml b/samples/themes/watermelon.toml new file mode 100644 index 00000000..45acb843 --- /dev/null +++ b/samples/themes/watermelon.toml @@ -0,0 +1,48 @@ +[terminal.themes.watermelon] +color_aliases = { "JewelGreen" = "#157241", "PinkLace" = "#FFD5FD", "TorchRed" = "#F50431", "ChelseaCucumber" = "#6CA94A", "ScreaminGreen" = "#8FFF52", "SunsetOrange" = "#f74b41", "Melon" = "#fdbcb4", "BlueStone" = "#005F5F", "HotPink" = "#FF74D7" } +"theme_default" = { fg = "$TorchRed", bg = "$PinkLace", attrs = "Default" } +"widgets.list.header" = { fg = "$PinkLace", bg = "$TorchRed", attrs = "Bold" } +"mail.listing.attachment_flag" = { fg = "LightSlateGrey", bg = "theme_default", attrs = "theme_default" } +"mail.listing.tag_default" = { bg = "$Melon", attrs = "Bold" } +"mail.listing.compact.even" = { fg = "White", bg = "$ChelseaCucumber", attrs = "Bold" } +"mail.listing.compact.odd" = { fg = "$PinkLace", bg = "$JewelGreen", attrs = "theme_default" } +"mail.listing.compact.even_unseen" = { fg = "$JewelGreen", bg = "$ScreaminGreen", attrs = "theme_default" } +"mail.listing.compact.odd_unseen" = { fg = "$JewelGreen", bg = "$ScreaminGreen", attrs = "theme_default" } +"mail.listing.compact.even_highlighted" = { fg = "$JewelGreen", bg = "$SunsetOrange", attrs = "theme_default" } +"mail.listing.compact.odd_highlighted" = { fg = "$JewelGreen", bg = "$SunsetOrange", attrs = "theme_default" } +"mail.listing.compact.even_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.compact.odd_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.conversations.date" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations.from" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations.highlighted" = { fg = "$JewelGreen", bg = "$SunsetOrange", attrs = "theme_default" } +"mail.listing.conversations.padding" = { fg = "$TorchRed", bg = "Grey15", attrs = "theme_default" } +"mail.listing.conversations.selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.conversations.subject" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.conversations.unseen" = { fg = "Black", bg = "mail.listing.compact.even_unseen", attrs = "theme_default" } +"mail.listing.conversations.unseen_padding" = { fg = "$BlueStone", bg = "mail.listing.conversations.unseen", attrs = "theme_default" } +"mail.listing.plain.even" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.odd" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.listing.plain.even_unseen" = { fg = "theme_default", bg = "mail.listing.compact.even_unseen", attrs = "theme_default" } +"mail.listing.plain.odd_unseen" = { fg = "theme_default", bg = "mail.listing.compact.odd_unseen", attrs = "theme_default" } +"mail.listing.plain.even_highlighted" = { fg = "$JewelGreen", bg = "$SunsetOrange", attrs = "theme_default" } +"mail.listing.plain.odd_highlighted" = { fg = "$JewelGreen", bg = "$SunsetOrange", attrs = "theme_default" } +"mail.listing.plain.even_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.plain.odd_selected" = { fg = "theme_default", bg = "LightCoral", attrs = "theme_default" } +"mail.listing.thread_snooze_flag" = { fg = "Red", bg = "theme_default", attrs = "theme_default" } +"mail.sidebar" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.sidebar_highlighted_account" = { fg = "White", bg = "$TorchRed", attrs = "theme_default" } +"mail.sidebar_highlighted_account_index" = { fg = "mail.sidebar_index", bg = "mail.sidebar_highlighted_account", attrs = "theme_default" } +"mail.sidebar_highlighted_account_unread_count" = { fg = "mail.sidebar_unread_count", bg = "mail.sidebar_highlighted_account", attrs = "theme_default" } +"mail.sidebar_highlighted" = { fg = "Grey7", bg = "White", attrs = "theme_default" } +"mail.sidebar_highlighted_index" = { fg = "mail.sidebar_index", bg = "mail.sidebar_highlighted", attrs = "theme_default" } +"mail.sidebar_highlighted_unread_count" = { fg = "mail.sidebar_highlighted", bg = "mail.sidebar_highlighted", attrs = "theme_default" } +"mail.sidebar_index" = { fg = "Grey46", bg = "theme_default", attrs = "theme_default" } +"mail.sidebar_unread_count" = { fg = "Grey46", bg = "theme_default", attrs = "theme_default" } +"mail.view.body" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"mail.view.headers" = { fg = "DodgerBlue1", bg = "theme_default", attrs = "theme_default" } +"status.bar" = { fg = "$PinkLace", bg = "$TorchRed", attrs = "theme_default" } +"status.notification" = { fg = "theme_default", bg = "theme_default", attrs = "Default" } +"tab.bar" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } +"tab.unfocused" = { fg = "$PinkLace", bg = "$HotPink", attrs = "theme_default" } +"tab.focused" = { fg = "theme_default", bg = "theme_default", attrs = "theme_default" } diff --git a/src/conf.rs b/src/conf.rs index b195d9c7..f13922fd 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -671,7 +671,7 @@ pub fn create_config_file(p: &Path) -> Result<()> { .create_new(true) .open(p) .expect("Could not create config file."); - file.write_all(include_bytes!("../sample-config")) + file.write_all(include_bytes!("../samples/sample-config.toml")) .expect("Could not write to config file."); println!("Written example configuration to {}", p.display()); let metadata = file.metadata()?;