From b43c6c9c562a712a0212a4c7a32cfecda024ce2d Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Fri, 18 Oct 2024 09:07:31 +1100 Subject: [PATCH] ignore commented lines when parsing sway config --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 487d19d..8b88d6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1154,7 +1154,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "sway-flash-indicator" -version = "0.7.0" +version = "0.7.1" dependencies = [ "clap", "directories", diff --git a/Cargo.toml b/Cargo.toml index b13e329..37e8a9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sway-flash-indicator" -version = "0.7.0" +version = "0.7.1" edition = "2021" [dependencies] diff --git a/src/main.rs b/src/main.rs index 2939f53..7863a55 100644 --- a/src/main.rs +++ b/src/main.rs @@ -356,7 +356,7 @@ async fn get_sway_config(connection: &mut swayipc_async::Connection) -> Res<()> let default_colours = config .config .split('\n') - .find(|v| v.contains("client.focused")) + .find(|v| v.contains("client.focused") && !v.starts_with('#')) .ok_or(Error::NoMatchingConfig)? .trim();