summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs
index 58e282d2..bd06641a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -280,10 +280,12 @@ impl<'de> Deserialize<'de> for Decorations {
where E: de::Error
{
if value {
- eprintln!("deprecated decorations boolean value, use one of default|transparent|buttonless|none instead; Falling back to \"full\"");
+ eprintln!("deprecated decorations boolean value, use one of \
+ default|transparent|buttonless|none instead; Falling back to \"full\"");
Ok(Decorations::Full)
} else {
- eprintln!("deprecated decorations boolean value, use one of default|transparent|buttonless|none instead; Falling back to \"none\"");
+ eprintln!("deprecated decorations boolean value, use one of \
+ default|transparent|buttonless|none instead; Falling back to \"none\"");
Ok(Decorations::None)
}
}
@@ -308,7 +310,7 @@ impl<'de> Deserialize<'de> for Decorations {
fn visit_str<E>(self, value: &str) -> ::std::result::Result<Decorations, E>
where E: de::Error
{
- match value {
+ match value.to_lowercase().as_str() {
"none" => Ok(Decorations::None),
"full" => Ok(Decorations::Full),
"transparent" => {
@@ -342,6 +344,7 @@ pub struct WindowConfig {
padding: Delta<u8>,
/// Draw the window with title bar / borders
+ #[serde(default)]
decorations: Decorations,
}