Skip to content

Commit

Permalink
refactor(deps): unify versions across workspace pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Sep 20, 2024
1 parent 182c1e6 commit 360d091
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 76 deletions.
37 changes: 11 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,37 @@ members = [
"komorebi-gui",
"komorebic",
"komorebic-no-console",
"komorebi-bar"
, "komorebi-themes"]
"komorebi-bar",
"komorebi-themes"
]

[workspace.dependencies]
clap = { version = "4", features = ["derive", "wrap_help"] }
chrono = "0.4"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
color-eyre = "0.6"
eframe = "0.28"
egui_extras = "0.28"
dirs = "5"
dunce = "1"
hotwatch = "0.5"
schemars = "0.8"
lazy_static = "1"
serde = { version = "1", features = ["derive"] }
serde_json = { package = "serde_json_lenient", version = "0.2" }
serde_yaml = "0.9"
sysinfo = "0.30"
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
paste = "1"
sysinfo = "0.31"
uds_windows = "1"
win32-display-data = { git = "https://github.com/LGUG2Z/win32-display-data", rev = "32a45cebf132c3d651ee22c0c40033a6b7edc945" }
windows-implement = { version = "0.53" }
windows-interface = { version = "0.53" }
shadow-rs = "0.34"
shadow-rs = "0.35"
which = "6"

[workspace.dependencies.windows]
version = "0.54"
Expand Down
22 changes: 11 additions & 11 deletions komorebi-bar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ edition = "2021"
komorebi-client = { path = "../komorebi-client" }
komorebi-themes = { path = "../komorebi-themes" }

chrono = "0.4"
clap = { version = "4", features = ["derive", "wrap_help"] }
color-eyre = "0.6"
crossbeam-channel = "0.5"
chrono = { workspace = true }
clap = { workspace = true }
color-eyre = { workspace = true }
crossbeam-channel = { workspace = true }
dirs = { workspace = true }
dunce = "1"
eframe = "0.28"
dunce = { workspace = true }
eframe = { workspace = true }
egui-phosphor = "0.6.0"
font-loader = "0.11"
hotwatch = "0.5"
hotwatch = { workspace = true }
image = "0.25"
netdev = "0.30"
num = "0.4.3"
Expand All @@ -29,9 +29,9 @@ serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = "0.8"
starship-battery = "0.10"
sysinfo = "0.31"
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
sysinfo = { workspace = true }
tracing = { workspace = true }
tracing-appender = { workspace = true }
tracing-subscriber = { workspace = true }
windows = { workspace = true }
windows-icons = { git = "https://github.com/LGUG2Z/windows-icons", rev = "d67cc9920aa9b4883393e411fb4fa2ddd4c498b5" }
3 changes: 2 additions & 1 deletion komorebi-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ edition = "2021"

[dependencies]
komorebi = { path = "../komorebi" }
uds_windows = "1"

uds_windows = { workspace = true }
serde_json = { workspace = true }
7 changes: 4 additions & 3 deletions komorebi-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
egui_extras = { version = "0.28" }
eframe = "0.28"
komorebi-client = { path = "../komorebi-client" }
serde_json = "1"

eframe = { workspace = true }
egui_extras = { workspace = true }
random_word = { version = "0.4.3", features = ["en"] }
serde_json = { workspace = true }
windows = { workspace = true }
4 changes: 2 additions & 2 deletions komorebi-themes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
[dependencies]
base16-egui-themes = { git = "https://github.com/LGUG2Z/base16-egui-themes", rev = "a2c48f45782c5604bf5482d3873021a9fe45ea1a" }
catppuccin-egui = { version = "5.1", default-features = false, features = ["egui28"] }
egui = "0.28"
serde = { workspace = true }
eframe = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
2 changes: 1 addition & 1 deletion komorebi-themes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde::Serialize;

pub use base16_egui_themes::Base16;
pub use catppuccin_egui;
pub use egui::Color32;
pub use eframe::egui::Color32;

#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)]
#[serde(tag = "type")]
Expand Down
26 changes: 13 additions & 13 deletions komorebi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,43 @@ edition = "2021"
komorebi-themes = { path = "../komorebi-themes" }

bitflags = { version = "2", features = ["serde"] }
clap = { version = "4", features = ["derive"] }
clap = { workspace = true }
color-eyre = { workspace = true }
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
crossbeam-channel = { workspace = true }
crossbeam-utils = { workspace = true }
ctrlc = { version = "3", features = ["termination"] }
dirs = { workspace = true }
dunce = { workspace = true }
getset = "0.1"
hex_color = { version = "3", features = ["serde"] }
hotwatch = "0.5"
lazy_static = "1"
hotwatch = { workspace = true }
lazy_static = { workspace = true }
miow = "0.6"
nanoid = "0.4"
net2 = "0.2"
os_info = "3.8"
parking_lot = "0.12"
paste = "1"
paste = { workspace = true }
regex = "1"
schemars = { workspace = true }
serde = { version = "1", features = ["derive"] }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
shadow-rs = { workspace = true }
strum = { version = "0.26", features = ["derive"] }
sysinfo = { workspace = true }
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
uds_windows = "1"
which = "6"
tracing = { workspace = true }
tracing-appender = { workspace = true }
tracing-subscriber = { workspace = true }
uds_windows = { workspace = true }
which = { workspace = true }
widestring = "1"
win32-display-data = { workspace = true }
windows = { workspace = true }
windows-implement = { workspace = true }
windows-interface = { workspace = true }
winput = "0.2"
winreg = "0.52"
shadow-rs = { workspace = true }

[build-dependencies]
shadow-rs = { workspace = true }
Expand Down
5 changes: 3 additions & 2 deletions komorebi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use crossbeam_utils::Backoff;
use parking_lot::deadlock;
use parking_lot::Mutex;
use sysinfo::Process;
use sysinfo::ProcessesToUpdate;
use tracing_appender::non_blocking::WorkerGuard;
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::EnvFilter;
Expand Down Expand Up @@ -167,9 +168,9 @@ fn main() -> Result<()> {
SESSION_ID.store(session_id, Ordering::SeqCst);

let mut system = sysinfo::System::new_all();
system.refresh_processes();
system.refresh_processes(ProcessesToUpdate::All);

let matched_procs: Vec<&Process> = system.processes_by_name("komorebi.exe").collect();
let matched_procs: Vec<&Process> = system.processes_by_name("komorebi.exe".as_ref()).collect();

if matched_procs.len() > 1 {
let mut len = matched_procs.len();
Expand Down
18 changes: 9 additions & 9 deletions komorebic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ edition = "2021"
[dependencies]
komorebi-client = { path = "../komorebi-client" }

clap = { version = "4", features = ["derive", "wrap_help"] }
chrono = "0.4"
chrono = { workspace = true }
clap = { workspace = true }
color-eyre = { workspace = true }
dirs = { workspace = true }
dunce = { workspace = true }
fs-tail = "0.1"
lazy_static = "1"
lazy_static = { workspace = true }
miette = { version = "7", features = ["fancy"] }
paste = "1"
paste = { workspace = true }
powershell_script = "1.0"
reqwest = { version = "0.12", features = ["blocking"] }
serde = { version = "1", features = ["derive"] }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = "0.9"
shadow-rs = { workspace = true }
sysinfo = { workspace = true }
thiserror = "1"
uds_windows = "1"
which = "6"
uds_windows = { workspace = true }
which = { workspace = true }
win32-display-data = { workspace = true }
windows = { workspace = true }
shadow-rs = { workspace = true }
schemars = { workspace = true }

[build-dependencies]
reqwest = { version = "0.12", features = ["blocking"] }
Expand Down
13 changes: 9 additions & 4 deletions komorebic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use miette::SourceSpan;
use paste::paste;
use schemars::gen::SchemaSettings;
use schemars::schema_for;
use sysinfo::ProcessesToUpdate;
use which::which;
use windows::Win32::Foundation::HWND;
use windows::Win32::UI::WindowsAndMessaging::ShowWindow;
Expand Down Expand Up @@ -1953,9 +1954,13 @@ fn main() -> Result<()> {
std::thread::sleep(Duration::from_secs(3));

let mut system = sysinfo::System::new_all();
system.refresh_processes();
system.refresh_processes(ProcessesToUpdate::All);

if system.processes_by_name("komorebi.exe").next().is_some() {
if system
.processes_by_name("komorebi.exe".as_ref())
.next()
.is_some()
{
println!("Started!");
running = true;
} else {
Expand Down Expand Up @@ -2094,9 +2099,9 @@ Stop-Process -Name:komorebi-bar -ErrorAction SilentlyContinue

send_message(&SocketMessage::Stop)?;
let mut system = sysinfo::System::new_all();
system.refresh_processes();
system.refresh_processes(ProcessesToUpdate::All);

if system.processes_by_name("komorebi.exe").count() >= 1 {
if system.processes_by_name("komorebi.exe".as_ref()).count() >= 1 {
println!("komorebi is still running, attempting to force-quit");

let script = r"
Expand Down

0 comments on commit 360d091

Please sign in to comment.