mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-20 15:41:38 +01:00
feat(wm): impl first pass of border manager
This commit introduces a very introductory attempt at a border manager. All of the colors work, from some brief usage it seems to behave as expected based on windows, with some caveats. There are issues with the window layering and popups which are annoyng - the borders always stay drawn on top of RustRover popups, for example. Also, the window tracking is incredibly slow and laggy when you try to move or resize using the mouse. Probably because the implementation uses NSWindow under the hood which according to Google is notoriously unperformant. None of the config options have been brought over yet. The border manager is defaulting to off for now in the absence of config - anyone at this commit who really wants to try it out should set BORDER_ENABLED in border_manager/mod.rs to "true".
This commit is contained in:
1 parent
a398609071
commit
28e0a2b75d
20 files changed
+4917
-216
No files matched your search
Generated
+3604
-156
File diff suppressed because it is too large.
Load diff
@@ -9,7 +9,10 @@ no-default-features = false
|
||||
feature-depth = 1
|
||||
|
||||
[advisories]
|
||||
ignore = []
|
||||
ignore = [
|
||||
{ id = "RUSTSEC-2024-0320", reason = "not using any yaml features from this library" },
|
||||
{ id = "RUSTSEC-2025-0056", reason = "only used for colour palette generation" }
|
||||
]
|
||||
|
||||
[licenses]
|
||||
allow = [
|
||||
@@ -18,8 +21,11 @@ allow = [
|
||||
"Artistic-2.0",
|
||||
"BSD-3-Clause",
|
||||
"CC0-1.0",
|
||||
"ISC",
|
||||
"MIT",
|
||||
"MPL-2.0",
|
||||
"OFL-1.1",
|
||||
"Ubuntu-font-1.0",
|
||||
"Unicode-3.0",
|
||||
"Zlib",
|
||||
|
||||
@@ -28,10 +34,7 @@ allow = [
|
||||
|
||||
# "BSD-2-Clause",
|
||||
# "BSL-1.0",
|
||||
# "ISC",
|
||||
# "MIT-0",
|
||||
# "OFL-1.1",
|
||||
# "Ubuntu-font-1.0",
|
||||
]
|
||||
confidence-threshold = 0.8
|
||||
|
||||
@@ -50,6 +53,16 @@ crate = "komorebic"
|
||||
expression = "LicenseRef-Komorebi-2.0"
|
||||
license-files = []
|
||||
|
||||
[[licenses.clarify]]
|
||||
crate = "komorebi-themes"
|
||||
expression = "LicenseRef-Komorebi-2.0"
|
||||
license-files = []
|
||||
|
||||
[[licenses.clarify]]
|
||||
crate = "base16-egui-themes"
|
||||
expression = "MIT"
|
||||
license-files = []
|
||||
|
||||
[bans]
|
||||
multiple-versions = "allow"
|
||||
wildcards = "allow"
|
||||
@@ -63,4 +76,10 @@ unknown-git = "deny"
|
||||
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
||||
allow-git = [
|
||||
"https://github.com/LGUG2Z/quickxml_to_serde",
|
||||
"https://github.com/LGUG2Z/base16-egui-themes",
|
||||
"https://github.com/LGUG2Z/catppuccin-egui",
|
||||
"https://github.com/LGUG2Z/flavours",
|
||||
"https://github.com/LGUG2Z/komorebi",
|
||||
"https://github.com/LGUG2Z/base16_color_scheme",
|
||||
|
||||
]
|
||||
+323
-43
@@ -3,25 +3,44 @@
|
||||
[
|
||||
"0BSD",
|
||||
[
|
||||
"adler 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"adler2 2.0.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
"Apache-2.0",
|
||||
[
|
||||
"addr2line 0.24.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ab_glyph 0.2.32 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ab_glyph_rasterizer 0.1.10 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit 0.17.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit_consumer 0.26.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit_macos 0.18.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit_winit 0.23.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"addr2line 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"adler 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"adler2 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ahash 0.8.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstream 0.6.20 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle 1.0.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle 1.0.13 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle-parse 0.2.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle-query 1.1.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anyhow 1.0.100 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"approx 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"arboard 3.6.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"arrayvec 0.7.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"atomic-waker 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"autocfg 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"backtrace 0.3.75 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"backtrace 0.3.76 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"base16_color_scheme 0.3.2 git+https://github.com/LGUG2Z/base16_color_scheme",
|
||||
"base64 0.22.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"beef 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bitflags 1.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bitflags 2.9.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cc 1.2.38 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytemuck 1.23.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytemuck_derive 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cc 1.2.39 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cfg-if 1.0.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cgl 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"chrono 0.4.42 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"clap 4.5.48 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"clap_builder 4.5.48 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -30,36 +49,74 @@
|
||||
"color-eyre 0.6.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"color-spantrace 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"colorchoice 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-foundation 0.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-foundation 0.9.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-foundation-sys 0.8.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-graphics 0.23.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-graphics-types 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crc32fast 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-channel 0.5.15 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-deque 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-epoch 0.9.18 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-utils 0.8.21 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ctrlc 3.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"deranged 0.5.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cursor-icon 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"deflate 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"deranged 0.5.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs 3.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs 4.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs 6.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs-sys 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs-sys 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dispatch2 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"displaydoc 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"document-features 0.2.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dpi 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dyn-clone 1.0.20 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ecolor 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"eframe 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"egui 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"egui-winit 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"egui_glow 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"either 1.15.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"emath 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"epaint 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"epaint_default_fonts 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"equivalent 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"errno 0.3.14 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"eyre 0.6.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fastrand 2.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fdeflate 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"filetime 0.2.26 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"find-msvc-tools 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"flate2 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fnv 1.0.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foreign-types 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foreign-types-macros 0.2.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foreign-types-shared 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"form_urlencoded 1.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-channel 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-core 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-sink 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-task 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-util 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"getrandom 0.1.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"getrandom 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"getrandom 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"gimli 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"gif 0.11.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"gimli 0.32.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"git2 0.20.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glob 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glow 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glutin 0.32.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"half 2.6.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hashbrown 0.12.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hashbrown 0.15.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hashbrown 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hex 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hex_color 3.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hotwatch 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"http 1.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"httparse 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -68,7 +125,10 @@
|
||||
"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",
|
||||
"image 0.25.8 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"immutable-chunkmap 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"indenter 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"indexmap 1.9.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"indexmap 2.11.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ipnet 2.11.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"iri-string 0.7.8 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -76,16 +136,29 @@
|
||||
"is_terminal_polyfill 1.70.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"itoa 1.0.15 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"jobserver 0.1.34 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"jpeg-decoder 0.1.22 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"lazy_static 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libc 0.2.175 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libc 0.2.176 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libgit2-sys 0.18.2+1.9.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libz-sys 1.1.22 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"linked-hash-map 0.5.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"litrs 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"lock_api 0.4.13 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"log 0.4.28 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"logos 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"logos-codegen 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"logos-derive 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"mime 0.3.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"minimal-lexical 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.4.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"moxcms 0.7.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"native-tls 0.2.14 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"nohash-hasher 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-conv 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-integer 0.1.46 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-iter 0.1.45 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-rational 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-traits 0.2.19 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num_threads 0.1.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-app-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -96,11 +169,16 @@
|
||||
"objc2-core-graphics 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-image 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-services 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-video 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-io-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-metal 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-quartz-core 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"object 0.36.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-security 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"object 0.37.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"once_cell 1.21.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"owned_ttf_parser 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"palette 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"palette_derive 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"parking_lot 0.12.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"parking_lot_core 0.9.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pastey 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -108,15 +186,27 @@
|
||||
"pin-project-lite 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pin-utils 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pkg-config 0.3.32 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"png 0.16.8 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"png 0.18.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"powerfmt 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ppv-lite86 0.2.21 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"proc-macro2 1.0.101 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quote 1.0.40 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"profiling 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pxfm 0.1.24 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quick-error 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quote 1.0.41 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand 0.7.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand 0.8.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_chacha 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_chacha 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_core 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_core 0.6.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex 1.11.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex-automata 0.4.10 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_pcg 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"raw-window-handle 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rayon 1.11.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rayon-core 1.13.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex 1.11.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex-automata 0.4.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex-syntax 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"reqwest 0.12.23 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rustc-demangle 0.1.26 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -126,31 +216,43 @@
|
||||
"scopeguard 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"security-framework 2.11.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"security-framework-sys 2.15.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde 1.0.226 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_core 1.0.226 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_derive 1.0.226 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_core 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_derive 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_derive_internals 0.29.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_json 1.0.145 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_json_lenient 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_urlencoded 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_variant 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_with 3.14.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_with_macros 3.14.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_yaml 0.8.26 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shadow-rs 1.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shell-words 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shellexpand 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shlex 1.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"siphasher 0.3.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"smallvec 1.15.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"smol_str 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"socket2 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"stable_deref_trait 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"static_assertions 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"syn 1.0.109 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"syn 2.0.106 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"sync_wrapper 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"system-configuration 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"system-configuration-sys 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tempfile 3.22.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tempfile 3.23.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"terminal_size 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror 1.0.69 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror 2.0.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror-impl 1.0.69 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror-impl 2.0.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror-impl 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thread_local 1.1.9 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"time 0.3.44 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"time-core 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"toml 0.5.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ttf-parser 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tz-rs 0.7.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tzdb 0.7.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tzdb_data 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -160,8 +262,16 @@
|
||||
"utf8_iter 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"utf8parse 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"vcpkg 0.2.15 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"version_check 0.9.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"web-time 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"webbrowser 1.0.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"weezl 0.1.10 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"winit 0.30.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"yaml-rust 0.4.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zerocopy 0.8.27 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zeroize 1.8.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
"zeroize 1.8.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zune-core 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zune-jpeg 0.4.21 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
@@ -186,7 +296,9 @@
|
||||
[
|
||||
"BSD-3-Clause",
|
||||
[
|
||||
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index"
|
||||
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"moxcms 0.7.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pxfm 0.1.24 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
@@ -203,26 +315,54 @@
|
||||
"notify-debouncer-full 0.1.0 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
"ISC",
|
||||
[
|
||||
"libloading 0.8.9 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
"MIT",
|
||||
[
|
||||
"addr2line 0.24.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit 0.17.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit_consumer 0.26.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"accesskit_macos 0.18.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"addr2line 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"adler 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"adler2 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ahash 0.8.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"aho-corasick 1.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstream 0.6.20 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle 1.0.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle 1.0.13 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle-parse 0.2.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anstyle-query 1.1.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"anyhow 1.0.100 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"arboard 3.6.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"arrayvec 0.7.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"atomic-waker 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"autocfg 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"backtrace 0.3.75 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"backtrace 0.3.76 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"base16_color_scheme 0.3.2 git+https://github.com/LGUG2Z/base16_color_scheme",
|
||||
"base64 0.22.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"beef 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bitflags 1.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bitflags 2.9.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"block-sys 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"block2 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"block2 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"block2 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytemuck 1.23.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytemuck_derive 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"byteorder 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"byteorder-lite 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytes 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cc 1.2.38 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"calm_io 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"calmio_filters 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"catppuccin-egui 5.3.1 git+https://github.com/LGUG2Z/catppuccin-egui?rev=bdaff30959512c4f7ee7304117076a48633d777f",
|
||||
"cc 1.2.39 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cfg-if 1.0.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cfg_aliases 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cgl 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"chrono 0.4.42 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"clap 4.5.48 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"clap_builder 4.5.48 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -230,29 +370,62 @@
|
||||
"clap_lex 0.7.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"color-eyre 0.6.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"color-spantrace 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"color-thief 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"color_quant 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"colorchoice 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-foundation 0.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-foundation 0.9.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-foundation-sys 0.8.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-graphics 0.23.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"core-graphics-types 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crc32fast 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-channel 0.5.15 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-deque 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-epoch 0.9.18 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"crossbeam-utils 0.8.21 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ctrlc 3.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cursor-icon 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"darling 0.21.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"darling_core 0.21.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"darling_macro 0.21.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"deranged 0.5.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"deflate 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"deranged 0.5.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs 3.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs 4.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs 6.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs-sys 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dirs-sys 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dispatch 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dispatch2 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"displaydoc 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"document-features 0.2.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dpi 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dyn-clone 1.0.20 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ecolor 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"eframe 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"egui 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"egui-winit 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"egui_glow 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"either 1.15.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"emath 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"epaint 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"epaint_default_fonts 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"equivalent 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"errno 0.3.14 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"eyre 0.6.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fastrand 2.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fax 0.2.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fax_derive 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fdeflate 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"filetime 0.2.26 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"find-msvc-tools 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"flate2 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"flavours 0.7.2 git+https://github.com/LGUG2Z/flavours",
|
||||
"fnv 1.0.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foreign-types 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foreign-types-macros 0.2.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foreign-types-shared 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"form_urlencoded 1.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fs-tail 0.1.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"fsevent-sys 4.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -261,13 +434,23 @@
|
||||
"futures-sink 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-task 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"futures-util 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"getrandom 0.1.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"getrandom 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"getrandom 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"gimli 0.31.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"gif 0.11.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"gimli 0.32.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"git2 0.20.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glob 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glow 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glutin-winit 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"h2 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"half 2.6.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hashbrown 0.12.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hashbrown 0.15.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hashbrown 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hex 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hex_color 3.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"hotwatch 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"http 1.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"http-body 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -280,7 +463,11 @@
|
||||
"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",
|
||||
"image 0.23.14 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"image 0.25.8 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"immutable-chunkmap 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"indenter 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"indexmap 1.9.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"indexmap 2.11.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ipnet 2.11.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"iri-string 0.7.8 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -288,25 +475,44 @@
|
||||
"is_terminal_polyfill 1.70.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"itoa 1.0.15 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"jobserver 0.1.34 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"jpeg-decoder 0.1.22 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"lazy_static 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libc 0.2.175 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libc 0.2.176 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libgit2-sys 0.18.2+1.9.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"libz-sys 1.1.22 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"linked-hash-map 0.5.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"litrs 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"lock_api 0.4.13 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"log 0.4.28 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"logos 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"logos-codegen 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"logos-derive 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"matchers 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"memchr 2.7.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"memchr 2.7.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"memoffset 0.9.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"mime 0.3.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"minimal-lexical 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.4.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"mio 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"nanoid 0.4.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"native-tls 0.2.14 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"nix 0.30.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"nohash-hasher 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"nom 7.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"nu-ansi-term 0.50.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-conv 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-integer 0.1.46 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-iter 0.1.45 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-rational 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num-traits 0.2.19 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"num_threads 0.1.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc-sys 0.3.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-app-kit 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-app-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-application-services 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-cloud-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -315,76 +521,115 @@
|
||||
"objc2-core-graphics 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-image 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-services 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-video 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-encode 3.0.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-encode 4.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-foundation 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-foundation 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-io-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-metal 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-quartz-core 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"object 0.36.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-security 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"object 0.37.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"once_cell 1.21.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"owo-colors 4.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"owo-colors 4.2.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"palette 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"palette_derive 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"parking_lot 0.12.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"parking_lot_core 0.9.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pastey 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"percent-encoding 2.3.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"phf 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"phf_codegen 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"phf_generator 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"phf_shared 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pin-project-lite 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pin-utils 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"pkg-config 0.3.32 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"png 0.16.8 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"png 0.18.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"powerfmt 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ppv-lite86 0.2.21 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"proc-macro2 1.0.101 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"profiling 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quick-error 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quick-xml 0.17.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quick-xml 0.38.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quickxml_to_serde 0.6.1 git+https://github.com/LGUG2Z/quickxml_to_serde.git",
|
||||
"quote 1.0.40 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"quote 1.0.41 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand 0.7.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand 0.8.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_chacha 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_chacha 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_core 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_core 0.6.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex 1.11.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex-automata 0.4.10 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rand_pcg 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"raw-window-handle 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rayon 1.11.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rayon-core 1.13.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex 1.11.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex-automata 0.4.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"regex-syntax 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"reqwest 0.12.23 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rgb 0.8.52 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rustc-demangle 0.1.26 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rustix 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"rustls-pki-types 1.12.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"same-file 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"schemars 0.8.22 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"schemars_derive 0.8.22 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"scoped_threadpool 0.1.9 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"scopeguard 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"security-framework 2.11.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"security-framework-sys 2.15.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde 1.0.226 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_core 1.0.226 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_derive 1.0.226 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_core 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_derive 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_derive_internals 0.29.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_json 1.0.145 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_json_lenient 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_urlencoded 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_variant 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_with 3.14.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_with_macros 3.14.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"serde_yaml 0.8.26 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shadow-rs 1.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"sharded-slab 0.1.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shell-words 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shellexpand 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"shlex 1.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"simd-adler32 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"siphasher 0.3.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"slab 0.4.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"smallvec 1.15.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"smol_str 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"socket2 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"stable_deref_trait 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"static_assertions 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"strsim 0.11.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"strum 0.27.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"strum_macros 0.27.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"syn 1.0.109 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"syn 2.0.106 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"synstructure 0.13.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"sysinfo 0.37.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"sysinfo 0.37.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"system-configuration 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"system-configuration-sys 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tempfile 3.22.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tempfile 3.23.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"terminal_size 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror 1.0.69 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror 2.0.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror-impl 1.0.69 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror-impl 2.0.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thiserror-impl 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"thread_local 1.1.9 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tiff 0.10.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tiff 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"time 0.3.44 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"time-core 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tokio 1.47.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tokio-native-tls 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tokio-util 0.7.16 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"toml 0.5.11 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tower 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tower-http 0.6.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tower-layer 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -397,6 +642,7 @@
|
||||
"tracing-log 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tracing-subscriber 0.3.20 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"try-lock 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ttf-parser 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tz-rs 0.7.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"tzdb_data 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"unicode-ident 1.0.19 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -405,10 +651,17 @@
|
||||
"utf8_iter 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"utf8parse 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"vcpkg 0.2.15 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"version_check 0.9.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"walkdir 2.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"want 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"web-time 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"webbrowser 1.0.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"weezl 0.1.10 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"yaml-rust 0.4.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zerocopy 0.8.27 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zeroize 1.8.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
"zeroize 1.8.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zune-core 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zune-jpeg 0.4.21 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
@@ -421,7 +674,20 @@
|
||||
"MPL-2.0",
|
||||
[
|
||||
"minidom 0.12.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"option-ext 0.2.0 registry+https://github.com/rust-lang/crates.io-index"
|
||||
"option-ext 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"ramhorns 1.0.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
"OFL-1.1",
|
||||
[
|
||||
"epaint_default_fonts 0.31.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
"Ubuntu-font-1.0",
|
||||
[
|
||||
"epaint_default_fonts 0.31.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
],
|
||||
[
|
||||
@@ -452,7 +718,9 @@
|
||||
"Unlicense",
|
||||
[
|
||||
"aho-corasick 1.1.3 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"memchr 2.7.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"byteorder 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"byteorder-lite 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"memchr 2.7.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"same-file 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"walkdir 2.5.0 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
@@ -460,9 +728,16 @@
|
||||
[
|
||||
"Zlib",
|
||||
[
|
||||
"adler32 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytemuck 1.23.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"bytemuck_derive 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"const_format 0.2.34 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"const_format_proc_macros 0.2.34 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"cursor-icon 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"dispatch2 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"foldhash 0.1.5 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"glow 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.4.4 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"miniz_oxide 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-app-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-application-services 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
@@ -472,9 +747,14 @@
|
||||
"objc2-core-graphics 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-image 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-services 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-core-video 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-io-kit 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-metal 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-quartz-core 0.3.1 registry+https://github.com/rust-lang/crates.io-index"
|
||||
"objc2-quartz-core 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"objc2-security 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"raw-window-handle 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zune-core 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
|
||||
"zune-jpeg 0.4.21 registry+https://github.com/rust-lang/crates.io-index"
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
@@ -5,18 +5,25 @@ description = "A tiling window manager for macOS"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
komorebi-themes = { git = "https://github.com/LGUG2Z/komorebi", version = "0.1.38"}
|
||||
|
||||
clap = { workspace = true }
|
||||
color-eyre = { workspace = true }
|
||||
crossbeam-channel = "0.5"
|
||||
crossbeam-utils = "0.8"
|
||||
ctrlc = { version = "3", features = ["termination"] }
|
||||
dispatch2 = "0.3"
|
||||
dirs = { workspace = true }
|
||||
hotwatch = "0.5"
|
||||
lazy_static = { workspace = true }
|
||||
nanoid = "0.4"
|
||||
block2 = "0.3"
|
||||
objc2 = "0.6"
|
||||
objc2-core-services = "0.3"
|
||||
objc2-app-kit = "0.3"
|
||||
objc2-application-services = "0.3"
|
||||
objc2-quartz-core = "0.3"
|
||||
objc2-core-video = "0.3"
|
||||
objc2-core-foundation = { version = "0.3", features = ["CFDictionary", "CFString"] }
|
||||
objc2-core-graphics = { version = "0.3", features = ["CGWindow", "alloc"] }
|
||||
objc2-foundation = "0.3"
|
||||
|
||||
@@ -15,6 +15,7 @@ use objc2_core_foundation::CFString;
|
||||
use objc2_core_foundation::CFType;
|
||||
use objc2_core_foundation::kCFRunLoopDefaultMode;
|
||||
use objc2_core_graphics::CGWindowID;
|
||||
use std::ffi::c_void;
|
||||
use std::ptr::NonNull;
|
||||
|
||||
pub mod action_constants;
|
||||
@@ -141,6 +142,7 @@ impl AccessibilityApi {
|
||||
observer: &AXObserver,
|
||||
element: &AXUIElement,
|
||||
notifications: &[&'static str],
|
||||
refcon: Option<*mut c_void>,
|
||||
) -> Result<(), AccessibilityError> {
|
||||
for notification in notifications {
|
||||
unsafe {
|
||||
@@ -148,7 +150,7 @@ impl AccessibilityApi {
|
||||
observer,
|
||||
element,
|
||||
&CFString::from_str(notification),
|
||||
std::ptr::null_mut(),
|
||||
refcon.unwrap_or_default(),
|
||||
)) {
|
||||
// we don't want to return until all the notifications have been added
|
||||
AccessibilityError::Api(AccessibilityApiError::Success) => {}
|
||||
@@ -175,8 +177,9 @@ impl AccessibilityApi {
|
||||
element: &AXUIElement,
|
||||
notifications: &[&'static str],
|
||||
run_loop: &CFRunLoop,
|
||||
refcon: Option<*mut c_void>,
|
||||
) -> Result<(), AccessibilityError> {
|
||||
AccessibilityApi::add_notifications_to_observer(observer, element, notifications)?;
|
||||
AccessibilityApi::add_notifications_to_observer(observer, element, notifications, refcon)?;
|
||||
|
||||
unsafe {
|
||||
CFRunLoop::add_source(
|
||||
|
||||
@@ -121,7 +121,7 @@ impl Application {
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
pub fn observe(&mut self, run_loop: &CFRunLoop) {
|
||||
pub fn observe(&mut self, run_loop: &CFRunLoop, refcon: Option<*mut c_void>) {
|
||||
tracing::info!(
|
||||
"registering observer for process: {}, name: {}",
|
||||
self.process_id,
|
||||
@@ -137,6 +137,7 @@ impl Application {
|
||||
&self.element,
|
||||
NOTIFICATIONS,
|
||||
run_loop,
|
||||
refcon,
|
||||
) {
|
||||
Ok(_) => {
|
||||
self.is_observable = true;
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
use crate::AccessibilityObserver;
|
||||
use crate::AccessibilityUiElement;
|
||||
use crate::CoreFoundationRunLoop;
|
||||
use crate::accessibility::AccessibilityApi;
|
||||
use crate::accessibility::notification_constants::kAXMainWindowChangedNotification;
|
||||
use crate::accessibility::notification_constants::kAXWindowMovedNotification;
|
||||
use crate::accessibility::notification_constants::kAXWindowResizedNotification;
|
||||
use crate::border_manager::BORDER_OFFSET;
|
||||
use crate::border_manager::BORDER_WIDTH;
|
||||
use crate::border_manager::ns_window::NsWindow;
|
||||
use crate::border_manager::window_kind_colour;
|
||||
use crate::core::WindowKind;
|
||||
use crate::core::rect::Rect;
|
||||
use crate::core_graphics::CoreGraphicsApi;
|
||||
use crate::macos_api::MacosApi;
|
||||
use color_eyre::eyre;
|
||||
use dispatch2::DispatchQueue;
|
||||
use komorebi_themes::colour::Rgb;
|
||||
use objc2_application_services::AXObserver;
|
||||
use objc2_application_services::AXUIElement;
|
||||
use objc2_core_foundation::CFString;
|
||||
use objc2_core_foundation::CGFloat;
|
||||
use objc2_core_graphics::CGMainDisplayID;
|
||||
use objc2_foundation::NSPoint;
|
||||
use objc2_foundation::NSRect;
|
||||
use objc2_quartz_core::CATransaction;
|
||||
use std::ffi::c_void;
|
||||
use std::ptr::NonNull;
|
||||
use std::sync::atomic::Ordering;
|
||||
use tracing::instrument;
|
||||
|
||||
#[instrument(skip_all)]
|
||||
unsafe extern "C-unwind" fn border_observer_callback(
|
||||
_observer: NonNull<AXObserver>,
|
||||
_element: NonNull<AXUIElement>,
|
||||
_notification: NonNull<CFString>,
|
||||
context: *mut c_void,
|
||||
) {
|
||||
unsafe {
|
||||
if !context.is_null() {
|
||||
let border = &*context.cast::<Border>();
|
||||
if !border.ns_window.window.isVisible() {
|
||||
return;
|
||||
}
|
||||
|
||||
if let Ok(rect) = MacosApi::window_rect(&border.tracking_element) {
|
||||
let frame = Rect::from(CoreGraphicsApi::display_bounds(CGMainDisplayID()));
|
||||
let mut ns_rect = NSRect::new(
|
||||
NSPoint::new(
|
||||
rect.origin.x,
|
||||
frame.bottom as CGFloat - rect.origin.y - rect.size.height,
|
||||
),
|
||||
rect.size,
|
||||
);
|
||||
|
||||
let offset = BORDER_OFFSET.load(Ordering::Relaxed) as f64;
|
||||
|
||||
ns_rect.origin.x -= offset;
|
||||
ns_rect.origin.y -= offset;
|
||||
ns_rect.size.width += offset * 2.0;
|
||||
ns_rect.size.height += offset * 2.0;
|
||||
|
||||
border.update();
|
||||
border
|
||||
.ns_window
|
||||
.window
|
||||
.setFrame_display_animate(ns_rect, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Border {
|
||||
pub id: String,
|
||||
#[allow(dead_code)]
|
||||
// we need to keep a reference to this so it stays alive
|
||||
pub observer: AccessibilityObserver,
|
||||
pub tracking_element: AccessibilityUiElement,
|
||||
pub tracking_window_id: u32,
|
||||
pub monitor_idx: Option<usize>,
|
||||
pub ns_window: NsWindow,
|
||||
pub window_kind: WindowKind,
|
||||
}
|
||||
|
||||
unsafe impl Send for Border {}
|
||||
|
||||
impl Border {
|
||||
pub fn create(
|
||||
id: &str,
|
||||
tracking_window_id: u32,
|
||||
process_id: i32,
|
||||
element: AccessibilityUiElement,
|
||||
monitor_idx: Option<usize>,
|
||||
run_loop: CoreFoundationRunLoop,
|
||||
) -> eyre::Result<Box<Self>> {
|
||||
let observer = AccessibilityObserver(AccessibilityApi::create_observer(
|
||||
process_id,
|
||||
Some(border_observer_callback),
|
||||
)?);
|
||||
|
||||
let rect = MacosApi::window_rect(&element).unwrap_or_default();
|
||||
|
||||
let frame = Rect::from(CoreGraphicsApi::display_bounds(unsafe {
|
||||
CGMainDisplayID()
|
||||
}));
|
||||
let ns_rect = NSRect::new(
|
||||
NSPoint::new(
|
||||
rect.origin.x,
|
||||
frame.bottom as CGFloat - rect.origin.y - rect.size.height,
|
||||
),
|
||||
rect.size,
|
||||
);
|
||||
|
||||
let mut border = Box::new(Self {
|
||||
id: id.to_string(),
|
||||
tracking_window_id,
|
||||
monitor_idx,
|
||||
observer: observer.clone(),
|
||||
tracking_element: element.clone(),
|
||||
ns_window: NsWindow::new(ns_rect)?,
|
||||
window_kind: WindowKind::Unfocused,
|
||||
});
|
||||
|
||||
DispatchQueue::main().exec_sync(|| {
|
||||
let border_ptr = std::ptr::addr_of_mut!(*border).cast::<c_void>();
|
||||
if let Err(error) = AccessibilityApi::add_observer_to_run_loop(
|
||||
&observer,
|
||||
&element,
|
||||
&[
|
||||
kAXWindowMovedNotification,
|
||||
kAXWindowResizedNotification,
|
||||
kAXMainWindowChangedNotification,
|
||||
],
|
||||
&run_loop,
|
||||
Some(border_ptr),
|
||||
) {
|
||||
tracing::warn!("failed to create border observer: {error}")
|
||||
}
|
||||
});
|
||||
|
||||
Ok(border)
|
||||
}
|
||||
|
||||
pub fn update(&self) {
|
||||
let colour = Rgb::from(window_kind_colour(self.window_kind));
|
||||
|
||||
CATransaction::begin();
|
||||
CATransaction::setDisableActions(true);
|
||||
self.ns_window.set_border_color(colour);
|
||||
self.ns_window
|
||||
.set_border_width(BORDER_WIDTH.load(Ordering::Relaxed) as f64);
|
||||
// TODO: why does this crash?
|
||||
// self.ns_window.window.setFrame_display(ns_rect, true);
|
||||
CATransaction::commit();
|
||||
}
|
||||
|
||||
pub fn destroy(&self) {
|
||||
self.ns_window.window.close();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,550 @@
|
||||
mod border;
|
||||
mod ns_window;
|
||||
|
||||
use crate::AccessibilityUiElement;
|
||||
use crate::CoreFoundationRunLoop;
|
||||
use crate::accessibility::AccessibilityApi;
|
||||
use crate::border_manager::border::Border;
|
||||
use crate::core::WindowKind;
|
||||
use crate::macos_api::MacosApi;
|
||||
use crate::ring::Ring;
|
||||
use crate::window_manager::WindowManager;
|
||||
use crate::workspace::Workspace;
|
||||
use crate::workspace::WorkspaceLayer;
|
||||
use color_eyre::eyre;
|
||||
use crossbeam_channel::Receiver;
|
||||
use crossbeam_channel::Sender;
|
||||
use crossbeam_utils::atomic::AtomicConsume;
|
||||
use dispatch2::DispatchQueue;
|
||||
use komorebi_themes::colour::Colour;
|
||||
use komorebi_themes::colour::Rgb;
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::sync::Arc;
|
||||
use std::sync::OnceLock;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::atomic::AtomicI32;
|
||||
use std::sync::atomic::AtomicU32;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
pub static BORDER_WIDTH: AtomicI32 = AtomicI32::new(6);
|
||||
pub static BORDER_OFFSET: AtomicI32 = AtomicI32::new(5);
|
||||
pub static BORDER_RADIUS: AtomicI32 = AtomicI32::new(10);
|
||||
pub static BORDER_ENABLED: AtomicBool = AtomicBool::new(true);
|
||||
|
||||
lazy_static! {
|
||||
pub static ref FOCUSED: AtomicU32 =
|
||||
AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(66, 165, 245))));
|
||||
pub static ref UNFOCUSED: AtomicU32 =
|
||||
AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(128, 128, 128))));
|
||||
pub static ref UNFOCUSED_LOCKED: AtomicU32 =
|
||||
AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(158, 8, 8))));
|
||||
pub static ref MONOCLE: AtomicU32 =
|
||||
AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(255, 51, 153))));
|
||||
pub static ref STACK: AtomicU32 = AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(0, 165, 66))));
|
||||
pub static ref FLOATING: AtomicU32 =
|
||||
AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(245, 245, 165))));
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref BORDER_STATE: Mutex<HashMap<String, Box<Border>>> = Mutex::new(HashMap::new());
|
||||
static ref WINDOWS_BORDERS: Mutex<HashMap<u32, String>> = Mutex::new(HashMap::new());
|
||||
}
|
||||
|
||||
pub enum Notification {
|
||||
Update(Option<AccessibilityUiElement>, Option<u32>),
|
||||
ForceUpdate,
|
||||
}
|
||||
|
||||
static CHANNEL: OnceLock<(Sender<Notification>, Receiver<Notification>)> = OnceLock::new();
|
||||
|
||||
pub fn channel() -> &'static (Sender<Notification>, Receiver<Notification>) {
|
||||
CHANNEL.get_or_init(|| crossbeam_channel::bounded(50))
|
||||
}
|
||||
|
||||
fn event_tx() -> Sender<Notification> {
|
||||
channel().0.clone()
|
||||
}
|
||||
|
||||
fn event_rx() -> Receiver<Notification> {
|
||||
channel().1.clone()
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, PartialEq)]
|
||||
pub struct BorderInfo {
|
||||
pub border_id: String,
|
||||
pub window_kind: WindowKind,
|
||||
}
|
||||
|
||||
pub fn window_border(window_id: u32) -> Option<BorderInfo> {
|
||||
let id = WINDOWS_BORDERS.lock().get(&window_id)?.clone();
|
||||
BORDER_STATE.lock().get(&id).map(|b| BorderInfo {
|
||||
border_id: b.id.clone(),
|
||||
window_kind: b.window_kind,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn send_notification(element: Option<AccessibilityUiElement>, window_id: Option<u32>) {
|
||||
if event_tx()
|
||||
.try_send(Notification::Update(element, window_id))
|
||||
.is_err()
|
||||
{
|
||||
tracing::warn!("channel is full; dropping notification")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn destroy_all_borders() -> eyre::Result<()> {
|
||||
let mut borders = BORDER_STATE.lock();
|
||||
tracing::info!(
|
||||
"purging known borders: {:?}",
|
||||
borders.iter().map(|b| b.1.id.clone()).collect::<Vec<_>>()
|
||||
);
|
||||
|
||||
for (_, border) in borders.drain() {
|
||||
let _ = destroy_border(border);
|
||||
}
|
||||
|
||||
drop(borders);
|
||||
|
||||
WINDOWS_BORDERS.lock().clear();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn window_kind_colour(focus_kind: WindowKind) -> u32 {
|
||||
match focus_kind {
|
||||
WindowKind::Unfocused => UNFOCUSED.load(Ordering::Relaxed),
|
||||
WindowKind::UnfocusedLocked => UNFOCUSED_LOCKED.load(Ordering::Relaxed),
|
||||
WindowKind::Single => FOCUSED.load(Ordering::Relaxed),
|
||||
WindowKind::Stack => STACK.load(Ordering::Relaxed),
|
||||
WindowKind::Monocle => MONOCLE.load(Ordering::Relaxed),
|
||||
WindowKind::Floating => FLOATING.load(Ordering::Relaxed),
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_borders(
|
||||
borders: &mut HashMap<String, Box<Border>>,
|
||||
windows_borders: &mut HashMap<u32, String>,
|
||||
monitor_idx: usize,
|
||||
condition: impl Fn(&String, &Border) -> bool,
|
||||
) -> color_eyre::Result<()> {
|
||||
let mut to_remove = vec![];
|
||||
for (id, border) in borders.iter() {
|
||||
// if border is on this monitor
|
||||
if border.monitor_idx.is_some_and(|idx| idx == monitor_idx)
|
||||
// and the condition applies
|
||||
&& condition(id, border)
|
||||
{
|
||||
// we mark it to be removed
|
||||
to_remove.push(id.clone());
|
||||
}
|
||||
}
|
||||
|
||||
for id in &to_remove {
|
||||
remove_border(id, borders, windows_borders)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn remove_border(
|
||||
id: &str,
|
||||
borders: &mut HashMap<String, Box<Border>>,
|
||||
windows_borders: &mut HashMap<u32, String>,
|
||||
) -> color_eyre::Result<()> {
|
||||
if let Some(removed_border) = borders.remove(id) {
|
||||
windows_borders.remove(&removed_border.tracking_window_id);
|
||||
destroy_border(removed_border)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn destroy_border(border: Box<Border>) -> color_eyre::Result<()> {
|
||||
DispatchQueue::main().exec_sync(|| {
|
||||
tracing::info!("invalidating border observer");
|
||||
AccessibilityApi::invalidate_observer(&border.observer);
|
||||
});
|
||||
|
||||
std::thread::sleep(std::time::Duration::from_millis(10));
|
||||
|
||||
let raw_pointer = Box::into_raw(border);
|
||||
unsafe {
|
||||
(*raw_pointer).destroy();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn listen_for_notifications(wm: Arc<Mutex<WindowManager>>, run_loop: CoreFoundationRunLoop) {
|
||||
std::thread::spawn(move || {
|
||||
loop {
|
||||
match handle_notifications(wm.clone(), run_loop.clone()) {
|
||||
Ok(()) => {
|
||||
tracing::warn!("restarting finished thread");
|
||||
}
|
||||
Err(error) => {
|
||||
tracing::warn!("restarting failed thread: {}", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fn handle_notifications(
|
||||
wm: Arc<Mutex<WindowManager>>,
|
||||
run_loop: CoreFoundationRunLoop,
|
||||
) -> color_eyre::Result<()> {
|
||||
tracing::info!("listening");
|
||||
|
||||
let receiver = event_rx();
|
||||
event_tx().send(Notification::Update(None, None))?;
|
||||
|
||||
let mut previous_snapshot = Ring::default();
|
||||
let mut previous_pending_move_op = None;
|
||||
let mut previous_is_paused = false;
|
||||
let mut previous_notification: Option<Notification> = None;
|
||||
let mut previous_layer = WorkspaceLayer::default();
|
||||
|
||||
'receiver: for notification in receiver {
|
||||
let state = wm.lock();
|
||||
let is_paused = state.is_paused;
|
||||
let focused_monitor_idx = state.focused_monitor_idx();
|
||||
let focused_workspace_idx =
|
||||
state.monitors.elements()[focused_monitor_idx].focused_workspace_idx();
|
||||
let monitors = state.monitors.clone();
|
||||
let pending_move_op = *state.pending_move_op;
|
||||
let floating_window_hwnds = state.monitors.elements()[focused_monitor_idx].workspaces()
|
||||
[focused_workspace_idx]
|
||||
.floating_windows()
|
||||
.iter()
|
||||
.map(|w| w.id)
|
||||
.collect::<Vec<_>>();
|
||||
let workspace_layer = state.monitors.elements()[focused_monitor_idx].workspaces()
|
||||
[focused_workspace_idx]
|
||||
.layer;
|
||||
let foreground_window = MacosApi::foreground_window_id().unwrap_or_default();
|
||||
let _layer_changed = previous_layer != workspace_layer;
|
||||
let _forced_update = matches!(notification, Notification::ForceUpdate);
|
||||
|
||||
drop(state);
|
||||
|
||||
let should_process_notification = match notification {
|
||||
Notification::Update(_, notification_window_id) => {
|
||||
let mut should_process_notification = true;
|
||||
|
||||
if monitors == previous_snapshot
|
||||
// handle the window dragging edge case
|
||||
&& pending_move_op == previous_pending_move_op
|
||||
{
|
||||
should_process_notification = false;
|
||||
}
|
||||
|
||||
// handle the pause edge case
|
||||
if is_paused && !previous_is_paused {
|
||||
should_process_notification = true;
|
||||
}
|
||||
|
||||
// handle the unpause edge case
|
||||
if previous_is_paused && !is_paused {
|
||||
should_process_notification = true;
|
||||
}
|
||||
|
||||
// handle the retile edge case
|
||||
if !should_process_notification && BORDER_STATE.lock().is_empty() {
|
||||
should_process_notification = true;
|
||||
}
|
||||
|
||||
// when we switch focus to/from a floating window
|
||||
let switch_focus_to_from_floating_window = floating_window_hwnds.iter().any(|fw| {
|
||||
// if we switch focus to a floating window
|
||||
fw == ¬ification_window_id.unwrap_or_default() ||
|
||||
// if there is any floating window with a `WindowKind::Floating` border
|
||||
// that no longer is the foreground window then we need to update that
|
||||
// border.
|
||||
(fw != &foreground_window
|
||||
&& window_border(*fw)
|
||||
.is_some_and(|b| b.window_kind == WindowKind::Floating))
|
||||
});
|
||||
|
||||
// when the focused window has an `Unfocused` border kind, usually this happens if
|
||||
// we focus an admin window and then refocus the previously focused window. For
|
||||
// komorebi it will have the same state has before, however the previously focused
|
||||
// window changed its border to unfocused so now we need to update it again.
|
||||
if !should_process_notification
|
||||
&& window_border(notification_window_id.unwrap_or_default())
|
||||
.is_some_and(|b| b.window_kind == WindowKind::Unfocused)
|
||||
{
|
||||
should_process_notification = true;
|
||||
}
|
||||
|
||||
if !should_process_notification && switch_focus_to_from_floating_window {
|
||||
should_process_notification = true;
|
||||
}
|
||||
|
||||
if !should_process_notification
|
||||
&& let Some(Notification::Update(_, ref previous_window_id)) =
|
||||
previous_notification
|
||||
&& previous_window_id.unwrap_or_default()
|
||||
!= notification_window_id.unwrap_or_default()
|
||||
{
|
||||
should_process_notification = true;
|
||||
}
|
||||
|
||||
should_process_notification
|
||||
}
|
||||
Notification::ForceUpdate => true,
|
||||
};
|
||||
|
||||
if !should_process_notification {
|
||||
// tracing::debug!("monitor state matches latest snapshot, skipping notification");
|
||||
continue 'receiver;
|
||||
}
|
||||
|
||||
let mut borders = BORDER_STATE.lock();
|
||||
let mut windows_borders = WINDOWS_BORDERS.lock();
|
||||
|
||||
// If borders are disabled
|
||||
if !BORDER_ENABLED.load_consume()
|
||||
// Or if the wm is paused
|
||||
|| is_paused
|
||||
{
|
||||
// Destroy the borders we know about
|
||||
for (_, border) in borders.drain() {
|
||||
destroy_border(border)?;
|
||||
}
|
||||
|
||||
windows_borders.clear();
|
||||
|
||||
previous_is_paused = is_paused;
|
||||
continue 'receiver;
|
||||
}
|
||||
|
||||
'monitors: for (monitor_idx, m) in monitors.elements().iter().enumerate() {
|
||||
if let Some(ws) = m.focused_workspace() {
|
||||
if !ws.tile {
|
||||
remove_borders(&mut borders, &mut windows_borders, monitor_idx, |_, _| true)?;
|
||||
continue 'monitors;
|
||||
}
|
||||
|
||||
if let Some(monocle) = &ws.monocle_container
|
||||
&& let Some(window) = monocle.focused_window()
|
||||
{
|
||||
let focused_window_id =
|
||||
monocle.focused_window().map(|w| w.id).unwrap_or_default();
|
||||
let id = monocle.id.clone();
|
||||
let border = match borders.entry(id.clone()) {
|
||||
Entry::Occupied(entry) => entry.into_mut(),
|
||||
Entry::Vacant(entry) => {
|
||||
if let Ok(border) = Border::create(
|
||||
&monocle.id,
|
||||
window.id,
|
||||
window.application.process_id,
|
||||
window.element.clone(),
|
||||
Some(monitor_idx),
|
||||
run_loop.clone(),
|
||||
) {
|
||||
entry.insert(border)
|
||||
} else {
|
||||
continue 'monitors;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let new_focus_state = if monitor_idx != focused_monitor_idx {
|
||||
WindowKind::Unfocused
|
||||
} else {
|
||||
WindowKind::Monocle
|
||||
};
|
||||
|
||||
border.window_kind = new_focus_state;
|
||||
|
||||
// Update the borders tracking_hwnd in case it changed and remove the
|
||||
// old `tracking_hwnd` from `WINDOWS_BORDERS` if needed.
|
||||
if border.tracking_window_id != focused_window_id {
|
||||
if let Some(previous) = windows_borders.get(&border.tracking_window_id) {
|
||||
// Only remove the border from `windows_borders` if it
|
||||
// still corresponds to the same border, if doesn't then
|
||||
// it means it was already updated by another border for
|
||||
// that window and in that case we don't want to remove it.
|
||||
if previous == &id {
|
||||
windows_borders.remove(&border.tracking_window_id);
|
||||
}
|
||||
}
|
||||
border.tracking_window_id = focused_window_id;
|
||||
}
|
||||
|
||||
// Update the border's monitor idx in case it changed
|
||||
border.monitor_idx = Some(monitor_idx);
|
||||
border.update();
|
||||
|
||||
windows_borders.insert(focused_window_id, id);
|
||||
|
||||
let border_id = border.id.clone();
|
||||
|
||||
if ws.layer == WorkspaceLayer::Floating {
|
||||
handle_floating_borders(
|
||||
&mut borders,
|
||||
&mut windows_borders,
|
||||
ws,
|
||||
monitor_idx,
|
||||
foreground_window,
|
||||
run_loop.clone(),
|
||||
)?;
|
||||
|
||||
// Remove all borders on this monitor except monocle and floating borders
|
||||
remove_borders(&mut borders, &mut windows_borders, monitor_idx, |_, b| {
|
||||
border_id != b.id
|
||||
&& !ws
|
||||
.floating_windows()
|
||||
.iter()
|
||||
.any(|w| w.id == b.tracking_window_id)
|
||||
})?;
|
||||
} else {
|
||||
// Remove all borders on this monitor except monocle
|
||||
remove_borders(&mut borders, &mut windows_borders, monitor_idx, |_, b| {
|
||||
border_id != b.id
|
||||
})?;
|
||||
}
|
||||
continue 'monitors;
|
||||
}
|
||||
|
||||
// Collect focused workspace container and floating windows ID's
|
||||
let container_and_floating_window_ids = ws
|
||||
.containers()
|
||||
.iter()
|
||||
.map(|c| c.id.clone())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
remove_borders(&mut borders, &mut windows_borders, monitor_idx, |id, _| {
|
||||
!container_and_floating_window_ids.contains(id)
|
||||
})?;
|
||||
|
||||
for (idx, c) in ws.containers().iter().enumerate() {
|
||||
if let Some(window) = c.focused_window() {
|
||||
let id = c.id.clone();
|
||||
|
||||
let border = match borders.entry(id.clone()) {
|
||||
Entry::Occupied(entry) => entry.into_mut(),
|
||||
Entry::Vacant(entry) => {
|
||||
if let Ok(border) = Border::create(
|
||||
&c.id,
|
||||
window.id,
|
||||
window.application.process_id,
|
||||
window.element.clone(),
|
||||
Some(monitor_idx),
|
||||
run_loop.clone(),
|
||||
) {
|
||||
entry.insert(border)
|
||||
} else {
|
||||
continue 'monitors;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let new_focus_state = if idx != ws.focused_container_idx()
|
||||
|| monitor_idx != focused_monitor_idx
|
||||
|| window.id != foreground_window
|
||||
{
|
||||
if c.locked {
|
||||
WindowKind::UnfocusedLocked
|
||||
} else {
|
||||
WindowKind::Unfocused
|
||||
}
|
||||
} else if c.windows().len() > 1 {
|
||||
WindowKind::Stack
|
||||
} else {
|
||||
WindowKind::Single
|
||||
};
|
||||
|
||||
border.window_kind = new_focus_state;
|
||||
|
||||
if border.tracking_window_id != window.id {
|
||||
if let Some(previous) = windows_borders.get(&border.tracking_window_id)
|
||||
{
|
||||
// Only remove the border from `windows_borders` if it
|
||||
// still corresponds to the same border, if doesn't then
|
||||
// it means it was already updated by another border for
|
||||
// that window and in that case we don't want to remove it.
|
||||
if previous == &id {
|
||||
windows_borders.remove(&border.tracking_window_id);
|
||||
}
|
||||
}
|
||||
border.tracking_window_id = window.id;
|
||||
}
|
||||
|
||||
border.monitor_idx = Some(monitor_idx);
|
||||
border.update();
|
||||
|
||||
windows_borders.insert(window.id, id);
|
||||
}
|
||||
|
||||
handle_floating_borders(
|
||||
&mut borders,
|
||||
&mut windows_borders,
|
||||
ws,
|
||||
monitor_idx,
|
||||
foreground_window,
|
||||
run_loop.clone(),
|
||||
)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
previous_snapshot = monitors;
|
||||
previous_pending_move_op = pending_move_op;
|
||||
previous_is_paused = is_paused;
|
||||
previous_notification = Some(notification);
|
||||
previous_layer = workspace_layer;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_floating_borders(
|
||||
borders: &mut HashMap<String, Box<Border>>,
|
||||
windows_borders: &mut HashMap<u32, String>,
|
||||
ws: &Workspace,
|
||||
monitor_idx: usize,
|
||||
foreground_window: u32,
|
||||
run_loop: CoreFoundationRunLoop,
|
||||
) -> color_eyre::Result<()> {
|
||||
for window in ws.floating_windows() {
|
||||
let id = window.id.to_string();
|
||||
let border = match borders.entry(id.clone()) {
|
||||
Entry::Occupied(entry) => entry.into_mut(),
|
||||
Entry::Vacant(entry) => {
|
||||
if let Ok(border) = Border::create(
|
||||
&window.id.to_string(),
|
||||
window.id,
|
||||
window.application.process_id,
|
||||
window.element.clone(),
|
||||
Some(monitor_idx),
|
||||
run_loop.clone(),
|
||||
) {
|
||||
entry.insert(border)
|
||||
} else {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let new_focus_state = if foreground_window == window.id {
|
||||
WindowKind::Floating
|
||||
} else {
|
||||
WindowKind::Unfocused
|
||||
};
|
||||
|
||||
border.window_kind = new_focus_state;
|
||||
// Update the border's monitor idx in case it changed
|
||||
border.monitor_idx = Some(monitor_idx);
|
||||
|
||||
border.update();
|
||||
|
||||
windows_borders.insert(window.id, id);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
use crate::border_manager::BORDER_OFFSET;
|
||||
use crate::border_manager::BORDER_RADIUS;
|
||||
use crate::border_manager::BORDER_WIDTH;
|
||||
use color_eyre::eyre;
|
||||
use color_eyre::eyre::OptionExt;
|
||||
use dispatch2::DispatchQueue;
|
||||
use komorebi_themes::colour::Rgb;
|
||||
use objc2::MainThreadMarker;
|
||||
use objc2::MainThreadOnly;
|
||||
use objc2::msg_send;
|
||||
use objc2::rc::Retained;
|
||||
use objc2_app_kit::NSBackingStoreType;
|
||||
use objc2_app_kit::NSColor;
|
||||
use objc2_app_kit::NSNormalWindowLevel;
|
||||
use objc2_app_kit::NSView;
|
||||
use objc2_app_kit::NSWindow;
|
||||
use objc2_app_kit::NSWindowAnimationBehavior;
|
||||
use objc2_app_kit::NSWindowCollectionBehavior;
|
||||
use objc2_app_kit::NSWindowStyleMask;
|
||||
use objc2_core_graphics::CGColor;
|
||||
use objc2_foundation::NSDictionary;
|
||||
use objc2_foundation::NSRect;
|
||||
use objc2_quartz_core::CALayer;
|
||||
use std::ops::Deref;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::mpsc;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct NsWindow {
|
||||
pub window: Retained<NSWindow>,
|
||||
pub layer: Retained<CALayer>,
|
||||
}
|
||||
|
||||
unsafe impl Send for NsWindow {}
|
||||
|
||||
impl NsWindow {
|
||||
pub fn new(ns_rect: NSRect) -> eyre::Result<NsWindow> {
|
||||
let offset = BORDER_OFFSET.load(Ordering::Relaxed) as f64;
|
||||
|
||||
let mut ns_rect = ns_rect;
|
||||
|
||||
ns_rect.origin.x -= offset;
|
||||
ns_rect.origin.y -= offset;
|
||||
ns_rect.size.width += offset * 2.0;
|
||||
ns_rect.size.height += offset * 2.0;
|
||||
|
||||
let (tx, rx) = mpsc::channel();
|
||||
|
||||
DispatchQueue::main().exec_async(move || {
|
||||
let mtm = unsafe { MainThreadMarker::new_unchecked() };
|
||||
|
||||
// Create window
|
||||
let window_frame = ns_rect;
|
||||
|
||||
let window = unsafe {
|
||||
let window = NSWindow::alloc(mtm);
|
||||
NSWindow::initWithContentRect_styleMask_backing_defer(
|
||||
window,
|
||||
window_frame,
|
||||
NSWindowStyleMask::Borderless,
|
||||
NSBackingStoreType::Buffered,
|
||||
false,
|
||||
)
|
||||
};
|
||||
|
||||
// Make transparent
|
||||
unsafe {
|
||||
window.setBackgroundColor(Some(&NSColor::clearColor()));
|
||||
window.setAnimationBehavior(NSWindowAnimationBehavior::None);
|
||||
window.disableSnapshotRestoration();
|
||||
window.setPreservesContentDuringLiveResize(false);
|
||||
window.setRestorable(false);
|
||||
}
|
||||
|
||||
window.setHasShadow(false);
|
||||
window.setOpaque(false);
|
||||
window.setLevel(NSNormalWindowLevel);
|
||||
window.setIgnoresMouseEvents(true);
|
||||
|
||||
unsafe {
|
||||
window.setCollectionBehavior(
|
||||
NSWindowCollectionBehavior::CanJoinAllSpaces |
|
||||
NSWindowCollectionBehavior::Stationary |
|
||||
NSWindowCollectionBehavior::IgnoresCycle |
|
||||
NSWindowCollectionBehavior::Transient
|
||||
);
|
||||
}
|
||||
|
||||
let content_view = {
|
||||
let view = NSView::alloc(mtm);
|
||||
unsafe { NSView::initWithFrame(view, window_frame) }
|
||||
};
|
||||
|
||||
content_view.setWantsLayer(true);
|
||||
unsafe {
|
||||
content_view.setAutoresizesSubviews(false);
|
||||
}
|
||||
|
||||
// Create and configure the layer for the border
|
||||
let layer = {
|
||||
let layer = CALayer::new();
|
||||
layer.setFrame(ns_rect);
|
||||
layer.setActions(Some(&NSDictionary::new()));
|
||||
|
||||
unsafe {
|
||||
// transparent
|
||||
let clear = CGColor::new_generic_rgb(0.0, 0.0, 0.0, 0.0);
|
||||
let clear_ptr = clear.deref() as *const _;
|
||||
let _: () = msg_send![&layer, setBackgroundColor: clear_ptr];
|
||||
|
||||
let red = CGColor::new_generic_rgb(1.0, 0.0, 0.0, 1.0);
|
||||
let red_ptr = red.deref() as *const _;
|
||||
let _: () = msg_send![&layer, setBorderColor: red_ptr];
|
||||
let _: () = msg_send![&layer, setBorderWidth: BORDER_WIDTH.load(Ordering::Relaxed) as f64];
|
||||
|
||||
let corner_radius: f64 = BORDER_RADIUS.load(Ordering::Relaxed) as f64;
|
||||
let _: () = msg_send![&layer, setCornerRadius: corner_radius];
|
||||
|
||||
layer
|
||||
}
|
||||
};
|
||||
|
||||
unsafe {
|
||||
content_view.setLayer(Some(&layer));
|
||||
}
|
||||
|
||||
window.setContentView(Some(&content_view));
|
||||
window.setMovableByWindowBackground(false);
|
||||
window.makeKeyAndOrderFront(None);
|
||||
if let Err(error) = tx.send(NsWindow { window, layer }) {
|
||||
tracing::error!("could not send NSWindow created for border: {error}")
|
||||
}
|
||||
});
|
||||
|
||||
rx.recv()
|
||||
.ok()
|
||||
.ok_or_eyre("could not create a border NSWindow")
|
||||
}
|
||||
|
||||
pub fn set_border_color(&self, rgb: Rgb) {
|
||||
unsafe {
|
||||
// this is ass
|
||||
let color = CGColor::new_generic_rgb(
|
||||
rgb.r as f64 / 255.0,
|
||||
rgb.g as f64 / 255.0,
|
||||
rgb.b as f64 / 255.0,
|
||||
1.0,
|
||||
);
|
||||
let color_ptr = color.deref() as *const _;
|
||||
let _: () = msg_send![&self.layer, setBorderColor: color_ptr];
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_border_width(&self, width: f64) {
|
||||
unsafe {
|
||||
let _: () = msg_send![&self.layer, setBorderWidth: width];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,6 +189,31 @@ pub enum ApplicationIdentifier {
|
||||
Path,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Default,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
Display,
|
||||
EnumString,
|
||||
ValueEnum,
|
||||
PartialEq,
|
||||
Eq,
|
||||
Hash,
|
||||
)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub enum WindowKind {
|
||||
Single,
|
||||
Stack,
|
||||
Monocle,
|
||||
#[default]
|
||||
Unfocused,
|
||||
UnfocusedLocked,
|
||||
Floating,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub enum StateQuery {
|
||||
|
||||
+2
-1
@@ -49,6 +49,7 @@ pub mod ring;
|
||||
pub mod accessibility;
|
||||
pub mod app_kit_notification_constants;
|
||||
pub mod application;
|
||||
pub mod border_manager;
|
||||
pub mod container;
|
||||
pub mod core;
|
||||
pub mod core_graphics;
|
||||
@@ -228,7 +229,7 @@ pub fn notify_subscribers(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CoreFoundationRunLoop(pub CFRetained<CFRunLoop>);
|
||||
unsafe impl Sync for CoreFoundationRunLoop {}
|
||||
unsafe impl Send for CoreFoundationRunLoop {}
|
||||
|
||||
@@ -283,7 +283,7 @@ impl MacosApi {
|
||||
Entry::Vacant(vacant) => {
|
||||
let mut application = Application::new(info.owner_pid)?;
|
||||
// TODO: this ain't great, fix this OBS workaround
|
||||
application.observe(&wm.run_loop);
|
||||
application.observe(&wm.run_loop, None);
|
||||
vacant.insert(application)
|
||||
}
|
||||
};
|
||||
@@ -291,7 +291,7 @@ impl MacosApi {
|
||||
if let Some(window) = application.window_by_title(&info.name) {
|
||||
let mut rule_debug = RuleDebug::default();
|
||||
if window.should_manage(None, &mut rule_debug)? {
|
||||
window.observe(&wm.run_loop)?;
|
||||
window.observe(&wm.run_loop, None)?;
|
||||
entry.push(window);
|
||||
valid_window_count += 1
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ use clap::Parser;
|
||||
use clap::ValueEnum;
|
||||
use color_eyre::eyre;
|
||||
use color_eyre::eyre::OptionExt;
|
||||
use komorebi::CoreFoundationRunLoop;
|
||||
use komorebi::DATA_DIR;
|
||||
use komorebi::HOME_DIR;
|
||||
use komorebi::border_manager;
|
||||
use komorebi::core::pathext::replace_env_in_path;
|
||||
use komorebi::display_reconfiguration_listener::DisplayReconfigurationListener;
|
||||
use komorebi::input_event_listener::InputEventListener;
|
||||
@@ -256,6 +258,7 @@ fn main() -> eyre::Result<()> {
|
||||
|
||||
wm.lock().update_focused_workspace(true, true)?;
|
||||
|
||||
border_manager::listen_for_notifications(wm.clone(), CoreFoundationRunLoop(run_loop));
|
||||
listen_for_commands(wm.clone());
|
||||
listen_for_events(wm.clone());
|
||||
monitor_reconciliator::listen_for_notifications(wm.clone())?;
|
||||
@@ -290,7 +293,7 @@ fn main() -> eyre::Result<()> {
|
||||
}
|
||||
|
||||
// this gets our observer notification callbacks firing
|
||||
autoreleasepool(|_| unsafe { CFRunLoop::run_in_mode(kCFRunLoopDefaultMode, 2.0, false) });
|
||||
autoreleasepool(|_| unsafe { CFRunLoop::run_in_mode(kCFRunLoopDefaultMode, 0.1, false) });
|
||||
}
|
||||
|
||||
wm.lock().restore_all_windows(false)?;
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::DISPLAY_INDEX_PREFERENCES;
|
||||
use crate::Notification;
|
||||
use crate::NotificationEvent;
|
||||
use crate::WORKSPACE_MATCHING_RULES;
|
||||
use crate::border_manager;
|
||||
use crate::core::config_generation::WorkspaceMatchingRule;
|
||||
use crate::macos_api::MacosApi;
|
||||
use crate::monitor::Monitor;
|
||||
@@ -566,6 +567,8 @@ pub fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result
|
||||
initial_state.has_been_modified(&wm),
|
||||
)?;
|
||||
}
|
||||
|
||||
border_manager::send_notification(None, None);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -11,6 +11,7 @@ use crate::SUBSCRIPTION_SOCKETS;
|
||||
use crate::WORKSPACE_MATCHING_RULES;
|
||||
use crate::accessibility::AccessibilityApi;
|
||||
use crate::application::Application;
|
||||
use crate::border_manager;
|
||||
use crate::build;
|
||||
use crate::cf_array_as;
|
||||
use crate::core::ApplicationIdentifier;
|
||||
@@ -731,8 +732,14 @@ impl WindowManager {
|
||||
|
||||
self.update_focused_workspace(false, false)?;
|
||||
}
|
||||
SocketMessage::Retile => self.retile_all(false)?,
|
||||
SocketMessage::RetileWithResizeDimensions => self.retile_all(true)?,
|
||||
SocketMessage::Retile => {
|
||||
border_manager::destroy_all_borders()?;
|
||||
self.retile_all(false)?
|
||||
}
|
||||
SocketMessage::RetileWithResizeDimensions => {
|
||||
border_manager::destroy_all_borders()?;
|
||||
self.retile_all(true)?
|
||||
}
|
||||
SocketMessage::ToggleWorkspaceWindowContainerBehaviour => {
|
||||
let current_global_behaviour = self.window_management_behaviour.current_behaviour;
|
||||
if let Some(behaviour) =
|
||||
@@ -1670,6 +1677,9 @@ impl WindowManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.update_known_window_ids();
|
||||
|
||||
notify_subscribers(
|
||||
Notification {
|
||||
event: NotificationEvent::Socket(message.clone()),
|
||||
@@ -1678,7 +1688,7 @@ impl WindowManager {
|
||||
initial_state.has_been_modified(self.as_ref()),
|
||||
)?;
|
||||
|
||||
self.update_known_window_ids();
|
||||
border_manager::send_notification(None, None);
|
||||
|
||||
tracing::info!("processed");
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use crate::AccessibilityUiElement;
|
||||
use crate::FLOATING_APPLICATIONS;
|
||||
use crate::Notification;
|
||||
use crate::NotificationEvent;
|
||||
@@ -10,6 +11,7 @@ use crate::accessibility::error::AccessibilityApiError;
|
||||
use crate::accessibility::error::AccessibilityError;
|
||||
use crate::accessibility::notification_constants::AccessibilityNotification;
|
||||
use crate::app_kit_notification_constants::AppKitWorkspaceNotification;
|
||||
use crate::border_manager;
|
||||
use crate::core::Sizing;
|
||||
use crate::core::WindowContainerBehaviour;
|
||||
use crate::core::config_generation::MatchingRule;
|
||||
@@ -74,6 +76,7 @@ impl WindowManager {
|
||||
&& *space_id != current_space_id
|
||||
{
|
||||
tracing::trace!("ignoring events and commands while not on space {space_id}");
|
||||
border_manager::destroy_all_borders()?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -105,6 +108,19 @@ impl WindowManager {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut window_id = None;
|
||||
let mut window_element = None;
|
||||
|
||||
{
|
||||
let application = self.application(event.process_id())?;
|
||||
if let Some(element) = application.main_window()
|
||||
&& let Ok(wid) = AccessibilityApi::window_id(&element)
|
||||
{
|
||||
window_id = Some(wid);
|
||||
window_element = Some(AccessibilityUiElement(element.clone()));
|
||||
}
|
||||
}
|
||||
|
||||
// don't want to spam logs for manually triggered hacks triggered
|
||||
// from the input listener
|
||||
if !matches!(
|
||||
@@ -432,7 +448,7 @@ impl WindowManager {
|
||||
&& let Some(element) = window_element
|
||||
&& let Ok(mut window) = Window::new(element, application.clone())
|
||||
{
|
||||
window.observe(&self.run_loop)?;
|
||||
window.observe(&self.run_loop, None)?;
|
||||
|
||||
let behaviour = self
|
||||
.window_management_behaviour(focused_monitor_idx, focused_workspace_idx);
|
||||
@@ -925,6 +941,8 @@ impl WindowManager {
|
||||
initial_state.has_been_modified(self.as_ref()),
|
||||
)?;
|
||||
|
||||
border_manager::send_notification(window_element, window_id);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::TABBED_APPLICATIONS;
|
||||
use crate::accessibility::error::AccessibilityError;
|
||||
use crate::border_manager;
|
||||
use crate::window::Window;
|
||||
use crate::window_manager::WindowManager;
|
||||
use crossbeam_channel::Receiver;
|
||||
@@ -86,6 +87,7 @@ fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result<()>
|
||||
|
||||
// If an invalid window was cleaned up, we update the workspace
|
||||
wm.update_focused_workspace(false, false)?;
|
||||
border_manager::send_notification(None, Some(window_id));
|
||||
}
|
||||
ReaperNotification::MouseUpKeyUp => {
|
||||
// this first one will do a "nothing" update to check if any windows failed
|
||||
|
||||
@@ -339,7 +339,11 @@ impl Window {
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
pub fn observe(&self, run_loop: &CFRunLoop) -> Result<(), AccessibilityError> {
|
||||
pub fn observe(
|
||||
&self,
|
||||
run_loop: &CFRunLoop,
|
||||
refcon: Option<*mut c_void>,
|
||||
) -> Result<(), AccessibilityError> {
|
||||
tracing::info!("registering observer for {self}");
|
||||
|
||||
AccessibilityApi::add_observer_to_run_loop(
|
||||
@@ -347,6 +351,7 @@ impl Window {
|
||||
&self.element,
|
||||
NOTIFICATIONS,
|
||||
run_loop,
|
||||
refcon,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ impl WindowManager {
|
||||
Entry::Occupied(entry) => Ok(entry.into_mut()),
|
||||
Entry::Vacant(vacant) => {
|
||||
let mut application = Application::new(process_id)?;
|
||||
application.observe(&self.run_loop);
|
||||
application.observe(&self.run_loop, None);
|
||||
Ok(vacant.insert(application))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -993,8 +993,14 @@ impl Workspace {
|
||||
pub fn update(&mut self) -> eyre::Result<()> {
|
||||
// make sure we are never holding on to empty containers
|
||||
self.prune_duplicate_windows()?;
|
||||
let focused_container_idx = self.focused_container_idx();
|
||||
self.containers_mut().retain(|c| !c.windows().is_empty());
|
||||
|
||||
// make sure we are never focused on a no longer existent final empty container
|
||||
if focused_container_idx >= self.containers().len() {
|
||||
self.focus_container(focused_container_idx.saturating_sub(1));
|
||||
}
|
||||
|
||||
let container_padding = self
|
||||
.container_padding
|
||||
.or(self.globals.container_padding)
|
||||
|
||||
Reference in new issue
Block a user