mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-20 23:51:40 +01:00
style(kde): format with the project's rustfmt settings (tools/format-all --apply --tree kde)
Pure formatting by the same nightly rustfmt invocation the nix fmt check uses (tools/format-all, edition 2024, the tree's rustfmt.toml). No code change. Applied last on the candidate because it touches many files other agents were editing. Verified: tools/format-all --check --tree kde passes afterwards; light gates (fast-check) after all three.
This commit is contained in:
1 parent
e70a0e4921
commit
6e9800751b
13 files changed
+25
-30
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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!(
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in new issue
Block a user