fix(wm): ensure await-configuration is opt-in

This commit is contained in:
LGUG2Z
2022-08-11 20:02:45 -07:00
parent f669231517
commit 52b7b8d03d
6 changed files with 19 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "komorebi"
version = "0.1.11"
version = "0.1.12"
authors = ["Jade Iqbal <jadeiqbal@fastmail.com>"]
description = "A tiling window manager for Windows"
categories = ["tiling-window-manager", "windows"]
+9 -4
View File
@@ -256,9 +256,7 @@ pub fn load_configuration() -> Result<()> {
Command::new("AutoHotkey64.exe")
.arg(config_v2.as_os_str())
.output()?;
} else {
INITIAL_CONFIGURATION_LOADED.store(true, Ordering::SeqCst);
};
}
Ok(())
}
@@ -443,7 +441,14 @@ fn main() -> Result<()> {
wm.lock().init()?;
listen_for_commands(wm.clone());
std::thread::spawn(|| load_configuration().expect("could not load configuration"));
if !opts.await_configuration && !INITIAL_CONFIGURATION_LOADED.load(Ordering::SeqCst) {
INITIAL_CONFIGURATION_LOADED.store(true, Ordering::SeqCst);
};
std::thread::spawn(|| {
load_configuration().expect("could not load configuration");
});
if opts.await_configuration {
let backoff = Backoff::new();