Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

fix: hide watcher window via `no_console` feature

Lars Berger705b24620398
diff --git a/packages/watcher/Cargo.toml b/packages/watcher/Cargo.toml
index d8d8731d..c12af0a2 100644
--- a/packages/watcher/Cargo.toml
+++ b/packages/watcher/Cargo.toml
@@ -7,6 +7,9 @@ edition = "2021"
name = "glazewm-watcher"
path = "src/main.rs"
+[features]
+no_console = []
+
[build-dependencies]
tauri-winres = { workspace = true }
diff --git a/packages/watcher/src/main.rs b/packages/watcher/src/main.rs
index 4ac3c14f..0fae81c2 100644
--- a/packages/watcher/src/main.rs
+++ b/packages/watcher/src/main.rs
@@ -1,3 +1,8 @@
+// Conditionally build the application with either a `windows` or `console`
+// subsystem (default is `console`). This determines whether a console
+// window is spawned on launch, if not already ran through a console.
+#![cfg_attr(feature = "no_console", windows_subsystem = "windows")]
+
use anyhow::{bail, Context};
use tracing::info;
use wm::{