Skip to content

Commit

Permalink
update README and lipstick
Browse files Browse the repository at this point in the history
  • Loading branch information
h1romas4 committed May 7, 2024
1 parent fca7248 commit 1622c86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ layout {
| `timezone1` | `"name/offset"` | `"UTC/0"` | |
| `timezone[2-9]` | `"name/offset"` | - | |
| `default_timezone` | `"name"` | `"UTC"` | |
| `date_format` | [chrono::format::strftime](https://docs.rs/chrono/latest/chrono/format/strftime/index.html) | `%Y-%m-%d %a` | |
| `time_format` | [chrono::format::strftime](https://docs.rs/chrono/latest/chrono/format/strftime/index.html) | `%H:%M` | |
| `background_color` | `"#color"` | `"#0080a0"` | |
| `foreground_color` | `"#color"` | `"#ffffff"` | It may be adjusted automatically depending on the `background_color`. |
| `pane_color` | `"#color"` | `"#1e1e1e"` | |
Expand Down
6 changes: 4 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ static DEFAULT_ARROW_SEPARATOR_1: &str = "";
static DEFAULT_ARROW_SEPARATOR_2: &str = "";
static DEFAULT_ARROW_SEPARATOR_3: &str = "";
static DEFAULT_TEXT_ALIGN: &str = "right";
static DEFAULT_DATE_FORMAT: &str = "%Y-%m-%d %a";
static DEFAULT_TIME_ALIGN: &str = "%H:%M";

pub struct Config {
timezone: LinkedHashMap<String, f64>,
Expand All @@ -35,8 +37,8 @@ impl Default for Config {
Config {
timezone,
default_timezone: default_timezone.to_string(),
date_format: "%Y-%m-%d %a".to_string(),
time_format: "%H:%M".to_string(),
date_format: DEFAULT_DATE_FORMAT.to_string(),
time_format: DEFAULT_TIME_ALIGN.to_string(),
background_color: parse_color(DEFAULT_BACKGROUND_COLOR).unwrap(),
foreground_color: parse_color(DEFAULT_FOREGROUND_COLOR).unwrap(),
pane_color: parse_color(DEFAULT_PANE_COLOR).unwrap(),
Expand Down

0 comments on commit 1622c86

Please sign in to comment.