fix(bar): don't show komorebi-bar icon in the dock

This commit is contained in:
LGUG2Z committed 2025-10-01 14:16:36 -07:00
1 parent f5a979d4b4
commit 82b6247371
4 files changed
+15 -2

No files matched your search

Generated
+4 -2
View File
@@ -2887,6 +2887,8 @@ dependencies = [
"num",
"num-derive",
"num-traits",
"objc2 0.6.2",
"objc2-app-kit 0.3.1",
"parking_lot",
"random_word",
"reqwest",
@@ -5073,9 +5075,9 @@ dependencies = [
[[package]]
name = "rustls-webpki"
version = "0.103.6"
version = "0.103.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb"
checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf"
dependencies = [
"ring",
"rustls-pki-types",
+1
View File
@@ -524,6 +524,7 @@
"hyper-tls 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
"hyper-util 0.1.17 registry+https://github.com/rust-lang/crates.io-index",
"iana-time-zone 0.1.64 registry+https://github.com/rust-lang/crates.io-index",
"icns 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"ident_case 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
"idna 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"idna_adapter 1.2.1 registry+https://github.com/rust-lang/crates.io-index",
+2
View File
@@ -27,6 +27,8 @@ netdev = "0.36"
num = "0.4"
num-derive = "0.4"
num-traits = "0.2"
objc2 = "0.6"
objc2-app-kit = "0.3"
parking_lot = { workspace = true }
random_word = { version = "0.5", features = ["en"] }
reqwest = { version = "0.12", features = ["blocking"] }
+8
View File
@@ -20,6 +20,9 @@ use komorebi_client::PathExt;
use komorebi_client::SocketMessage;
use komorebi_client::SubscribeOptions;
use komorebi_client::replace_env_in_path;
use objc2::MainThreadMarker;
use objc2_app_kit::NSApplication;
use objc2_app_kit::NSApplicationActivationPolicy;
use std::io::BufReader;
use std::io::Read;
use std::path::PathBuf;
@@ -288,6 +291,11 @@ fn main() -> eyre::Result<()> {
"komorebi-bar",
native_options,
Box::new(|cc| {
unsafe {
let app = NSApplication::sharedApplication(MainThreadMarker::new_unchecked());
app.setActivationPolicy(NSApplicationActivationPolicy::Accessory);
}
let ctx_repainter = cc.egui_ctx.clone();
std::thread::spawn(move || loop {
std::thread::sleep(Duration::from_secs(1));