Compare commits

..

3 Commits

Author SHA1 Message Date
LGUG2Z
b2a34204c6 chore(release): v0.1.8 2022-01-27 11:10:29 -08:00
LGUG2Z
d18283969a fix(scoop): allow duplicate shim process
This commit addresses issues that users have been faced with when
installing komorebi with scoop, which resulted in komorebi exiting
almost immediately without providing any feedback as to what had
happened.

Scoop launches komorebi using an exe shim of the same name, which
results in two komorebi.exe named processes running at the same time.

This situation then fails the startup check which attempts to ensure
that only one instance of komorebi.exe ever runs at any given time.

The process startup check has been updated to allow for two komorebi.exe
named processes to be running if one of them is recognised as a Scoop
shim process.

fix #95
2022-01-27 11:07:23 -08:00
LGUG2Z
0138a313c0 docs(readme): update discord invite link 2022-01-17 09:12:12 -08:00
6 changed files with 22 additions and 10 deletions

6
Cargo.lock generated
View File

@@ -460,7 +460,7 @@ dependencies = [
[[package]]
name = "komorebi"
version = "0.1.7"
version = "0.1.8"
dependencies = [
"bitflags",
"clap",
@@ -493,7 +493,7 @@ dependencies = [
[[package]]
name = "komorebi-core"
version = "0.1.7"
version = "0.1.8"
dependencies = [
"clap",
"color-eyre",
@@ -506,7 +506,7 @@ dependencies = [
[[package]]
name = "komorebic"
version = "0.1.7"
version = "0.1.8"
dependencies = [
"clap",
"color-eyre",

View File

@@ -18,7 +18,7 @@ Translations of this document can be found in the project wiki:
- [komorebi 中文用户指南](https://github.com/LGUG2Z/komorebi/wiki/README-zh) (by [@crosstyan](https://github.com/crosstyan))
There is a [Discord server](https://discord.gg/vzBmPm6RkQ) available for _komorebi_-related discussion, help,
There is a [Discord server](https://discord.gg/mGkn66PHkx) available for _komorebi_-related discussion, help,
troubleshooting etc. If you have any specific feature requests or bugs to report, please create an issue in this
repository.

View File

@@ -1,6 +1,6 @@
[package]
name = "komorebi-core"
version = "0.1.7"
version = "0.1.8"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -1,6 +1,6 @@
[package]
name = "komorebi"
version = "0.1.7"
version = "0.1.8"
authors = ["Jade Iqbal <jadeiqbal@fastmail.com>"]
description = "A tiling window manager for Windows"
categories = ["tiling-window-manager", "windows"]

View File

@@ -24,6 +24,7 @@ use lazy_static::lazy_static;
use parking_lot::deadlock;
use parking_lot::Mutex;
use serde::Serialize;
use sysinfo::ProcessExt;
use sysinfo::SystemExt;
use tracing_appender::non_blocking::WorkerGuard;
use tracing_subscriber::layer::SubscriberExt;
@@ -341,9 +342,20 @@ fn main() -> Result<()> {
let mut system = sysinfo::System::new_all();
system.refresh_processes();
if system.process_by_name("komorebi.exe").len() > 1 {
tracing::error!("komorebi.exe is already running, please exit the existing process before starting a new one");
std::process::exit(1);
let matched_procs = system.process_by_name("komorebi.exe");
if matched_procs.len() > 1 {
let mut shim_is_active = false;
for proc in matched_procs {
if proc.root().ends_with("shims") {
shim_is_active = true;
}
}
if !shim_is_active {
tracing::error!("komorebi.exe is already running, please exit the existing process before starting a new one");
std::process::exit(1);
}
}
// File logging worker guard has to have an assignment in the main fn to work

View File

@@ -1,6 +1,6 @@
[package]
name = "komorebic"
version = "0.1.7"
version = "0.1.8"
authors = ["Jade Iqbal <jadeiqbal@fastmail.com>"]
description = "The command-line interface for Komorebi, a tiling window manager for Windows"
categories = ["cli", "tiling-window-manager", "windows"]