diff --git a/komorebi-for-kde/komorebi/src/animation/mod.rs b/komorebi-for-kde/komorebi/src/animation/mod.rs index 66bdd4d0..7d0a1e59 100644 --- a/komorebi-for-kde/komorebi/src/animation/mod.rs +++ b/komorebi-for-kde/komorebi/src/animation/mod.rs @@ -10,12 +10,11 @@ use crate::core::animation::AnimationStyle; -pub use prefix::AnimationPrefix; pub use komorebi_config::animation::PerAnimationPrefixConfig; +pub use prefix::AnimationPrefix; pub mod prefix; - pub const DEFAULT_ANIMATION_ENABLED: bool = false; pub const DEFAULT_ANIMATION_STYLE: AnimationStyle = AnimationStyle::Linear; pub const DEFAULT_ANIMATION_DURATION: u64 = 250; diff --git a/komorebi-for-kde/komorebi/src/daemon.rs b/komorebi-for-kde/komorebi/src/daemon.rs index 5d896b06..4c74e729 100644 --- a/komorebi-for-kde/komorebi/src/daemon.rs +++ b/komorebi-for-kde/komorebi/src/daemon.rs @@ -33,9 +33,6 @@ //! and closes the connection without writing anything, so a subscriber sees the daemon stop as a //! connection with nothing on it. -use clap::Parser; -use clap::ValueEnum; -use color_eyre::eyre; use crate::DATA_DIR; use crate::HOME_DIR; use crate::LOG_DIR; @@ -51,6 +48,9 @@ use crate::static_config::StaticConfig; use crate::static_config::StaticConfigExt; use crate::window_manager::WindowManager; use crate::window_manager_event_listener; +use clap::Parser; +use clap::ValueEnum; +use color_eyre::eyre; use komorebi_hotkeys::Format; use komorebi_hotkeys::engine::EngineOptions; use komorebi_hotkeys::plan::PlanMode; diff --git a/komorebi-for-kde/komorebi/src/lib.rs b/komorebi-for-kde/komorebi/src/lib.rs index e9c2c80d..19129612 100644 --- a/komorebi-for-kde/komorebi/src/lib.rs +++ b/komorebi-for-kde/komorebi/src/lib.rs @@ -64,13 +64,13 @@ extern crate komorebi_collections; pub use komorebi_collections::ring; -pub mod daemon; pub mod animation; pub mod backend; pub mod border_manager; pub mod check; pub mod container; pub mod core; +pub mod daemon; pub mod desktop; pub mod kwin; pub use komorebi_collections::lockable_sequence; diff --git a/komorebi-for-kde/komorebi/src/monitor.rs b/komorebi-for-kde/komorebi/src/monitor.rs index 926f3b72..44d052bb 100644 --- a/komorebi-for-kde/komorebi/src/monitor.rs +++ b/komorebi-for-kde/komorebi/src/monitor.rs @@ -820,7 +820,8 @@ mod tests { "Virtual-0", "Virtual-0", ); - let _ = m.focused_workspace_mut() + let _ = m + .focused_workspace_mut() .unwrap() .new_container_for_window(Window::from(id)); diff --git a/komorebi-for-kde/komorebi/src/process_event.rs b/komorebi-for-kde/komorebi/src/process_event.rs index 245a5fbe..30fbc884 100644 --- a/komorebi-for-kde/komorebi/src/process_event.rs +++ b/komorebi-for-kde/komorebi/src/process_event.rs @@ -88,8 +88,6 @@ //! [`Monitor::assign_windows_to_workspaces`]: crate::monitor::Monitor::assign_windows_to_workspaces //! [`Window::set_position`]: crate::window::Window::set_position -use crate::monitor::MonitorExt; -use crate::workspace::WorkspaceExt; use crate::FLOATING_APPLICATIONS; use crate::HIDDEN_WINDOWS; use crate::Notification; @@ -104,6 +102,7 @@ use crate::core::OperationDirection; use crate::core::Rect; use crate::core::Sizing; use crate::core::WindowContainerBehaviour; +use crate::monitor::MonitorExt; use crate::notify_subscribers; use crate::state::State; use crate::transparency_manager; @@ -115,6 +114,7 @@ use crate::window::should_act; use crate::window_manager::LiveResize; use crate::window_manager::WindowManager; use crate::window_manager_event::WindowManagerEvent; +use crate::workspace::WorkspaceExt; use crate::workspace::WorkspaceLayer; use color_eyre::eyre; use color_eyre::eyre::OptionExt; diff --git a/komorebi-for-kde/komorebi/src/reconcile.rs b/komorebi-for-kde/komorebi/src/reconcile.rs index 798b6796..04652eec 100644 --- a/komorebi-for-kde/komorebi/src/reconcile.rs +++ b/komorebi-for-kde/komorebi/src/reconcile.rs @@ -35,11 +35,11 @@ #![deny(missing_docs)] -use crate::monitor::MonitorExt; -use crate::workspace::WorkspaceExt; use crate::core::Rect; +use crate::monitor::MonitorExt; use crate::window::Window; use crate::window_manager::WindowManager; +use crate::workspace::WorkspaceExt; use color_eyre::eyre; use color_eyre::eyre::OptionExt; diff --git a/komorebi-for-kde/komorebi/src/static_config.rs b/komorebi-for-kde/komorebi/src/static_config.rs index ebfb3011..81748130 100644 --- a/komorebi-for-kde/komorebi/src/static_config.rs +++ b/komorebi-for-kde/komorebi/src/static_config.rs @@ -341,12 +341,8 @@ impl From<&WindowManager> for StaticConfig { border_radius: Option::from(border_manager::BORDER_RADIUS.load(Ordering::SeqCst)), border: Option::from(border_manager::BORDER_ENABLED.load(Ordering::SeqCst)), border_colours, - transparency: Option::from( - crate::settings::transparency_enabled(), - ), - transparency_alpha: Option::from( - crate::settings::transparency_alpha(), - ), + transparency: Option::from(crate::settings::transparency_enabled()), + transparency_alpha: Option::from(crate::settings::transparency_alpha()), transparency_ignore_rules: None, // border_style: Option::from(STYLE.load()), // border_z_order: None, diff --git a/komorebi-for-kde/komorebi/src/transparency_manager.rs b/komorebi-for-kde/komorebi/src/transparency_manager.rs index 33518f56..7e6f2ffe 100644 --- a/komorebi-for-kde/komorebi/src/transparency_manager.rs +++ b/komorebi-for-kde/komorebi/src/transparency_manager.rs @@ -20,7 +20,6 @@ use crate::window_manager::WindowManager; use komorebi_backend::WindowId; use std::collections::HashSet; - /// The opacity of a window that is not see-through at all. const OPAQUE: u8 = 255; diff --git a/komorebi-for-kde/komorebi/tests/asc.rs b/komorebi-for-kde/komorebi/tests/asc.rs index dd98bfae..d189d4b7 100644 --- a/komorebi-for-kde/komorebi/tests/asc.rs +++ b/komorebi-for-kde/komorebi/tests/asc.rs @@ -215,7 +215,8 @@ fn the_kinds_of_rule_of_other_platforms_are_read_and_do_nothing() { #[test] fn the_applications_file_komorebic_ships_floats_the_programs_it_names() { - let shipped = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../komorebic/src/linux/applications.json"); + let shipped = + Path::new(env!("CARGO_MANIFEST_DIR")).join("../../komorebic/src/linux/applications.json"); let mut desktop = Desktop::load(&applications(&shipped)).unwrap(); assert_eq!( diff --git a/komorebi-for-kde/komorebi/tests/maximize_commands.rs b/komorebi-for-kde/komorebi/tests/maximize_commands.rs index 3c289a0c..bb9f89ab 100644 --- a/komorebi-for-kde/komorebi/tests/maximize_commands.rs +++ b/komorebi-for-kde/komorebi/tests/maximize_commands.rs @@ -7,7 +7,6 @@ use komorebi::backend::fake::Command; use komorebi::backend::fake::FakeBackend; -use komorebi::workspace::WorkspaceExt; use komorebi::backend::with_backend; use komorebi::core::CycleDirection; use komorebi::core::OperationDirection; @@ -19,6 +18,7 @@ use komorebi::window_manager::WindowManager; use komorebi::window_manager_event::KWinNotification; use komorebi::window_manager_event::SystemNotification; use komorebi::window_manager_event::WindowManagerEvent; +use komorebi::workspace::WorkspaceExt; use komorebi_backend::Backend as _; use std::sync::Arc; diff --git a/komorebi-for-kde/komorebi/tests/transparency_config.rs b/komorebi-for-kde/komorebi/tests/transparency_config.rs index 111d593a..808d7bb6 100644 --- a/komorebi-for-kde/komorebi/tests/transparency_config.rs +++ b/komorebi-for-kde/komorebi/tests/transparency_config.rs @@ -60,10 +60,7 @@ fn the_transparency_keys_of_the_file_are_the_transparency_settings() { let _ = std::fs::remove_file(&socket); assert!(komorebi::settings::transparency_enabled()); - assert_eq!( - komorebi::settings::transparency_alpha(), - 120 - ); + assert_eq!(komorebi::settings::transparency_alpha(), 120); // two windows, one of which the rules keep opaque, and the one without the focus is see-through with_backend(fake.clone(), || { @@ -97,10 +94,7 @@ fn the_transparency_keys_of_the_file_are_the_transparency_settings() { .unwrap(); }); assert!(!komorebi::settings::transparency_enabled()); - assert_eq!( - komorebi::settings::transparency_alpha(), - 200 - ); + assert_eq!(komorebi::settings::transparency_alpha(), 200); assert_eq!(fake.opacity_of(46_002), 255, "opaque again"); // the ignore rules add up, and are not asked again diff --git a/komorebic/src/linux/mod.rs b/komorebic/src/linux/mod.rs index 510a2faa..8bffe585 100644 --- a/komorebic/src/linux/mod.rs +++ b/komorebic/src/linux/mod.rs @@ -576,7 +576,9 @@ pub fn main() -> eyre::Result<()> { std::fs::create_dir_all(&*HOME_DIR)?; std::fs::create_dir_all(&*komorebi_client::DATA_DIR)?; - let komorebi_json = include_str!("../../../komorebi-for-kde/docs/komorebi.example.json").to_string(); + let komorebi_json = + include_str!("../../../komorebi-for-kde/docs/komorebi.example.json") + .to_string(); let komorebi_path = HOME_DIR.join("komorebi.json"); let applications_path = HOME_DIR.join("applications.json"); let skhdrc_path = HOME_DIR.join("skhdrc"); diff --git a/komorebic/tests/linux_cli.rs b/komorebic/tests/linux_cli.rs index 24b660e2..c72ac904 100644 --- a/komorebic/tests/linux_cli.rs +++ b/komorebic/tests/linux_cli.rs @@ -998,7 +998,10 @@ fn the_schema_subcommands_print_a_json_schema_without_a_daemon() { #[test] fn the_schema_files_of_the_repository_are_what_the_subcommands_print() { - let root = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().join("komorebi-for-kde"); + let root = Path::new(env!("CARGO_MANIFEST_DIR")) + .parent() + .unwrap() + .join("komorebi-for-kde"); for (file, subcommand) in [ ("schema.json", "static-config-schema"),