feat: add option to set title color to info name color (#15)

This can be done by setting `PF_COL3` to `COL1`
This commit is contained in:
OldWorldOrdr 2023-03-15 15:35:36 -04:00 committed by GitHub
parent d04c5c3617
commit 9f8b035d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -120,7 +120,7 @@ PF_COL2=9
# Color of title data: # Color of title data:
# Default: unset (auto) # Default: unset (auto)
# Valid: 0-9 # Valid: 0-9, COL1 (copies COL1 value)
PF_COL3=1 PF_COL3=1
# Alignment paddings (this is different to the original version). # Alignment paddings (this is different to the original version).

View File

@ -261,7 +261,9 @@ fn main() {
} }
if let Ok(newcolor) = dotenvy::var("PF_COL3") { if let Ok(newcolor) = dotenvy::var("PF_COL3") {
if let Ok(newcolor) = pfetch::Color::from_str(&newcolor) { if newcolor == "COL1" {
logo.secondary_color = logo.primary_color;
} else if let Ok(newcolor) = pfetch::Color::from_str(&newcolor) {
logo.secondary_color = newcolor; logo.secondary_color = newcolor;
} }
} }