mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-12 08:02:40 +02:00
refactor(wm): reduce noise in info and error logs
This commit is contained in:
@@ -14,7 +14,6 @@ use komorebi_core::config_generation::MatchingRule;
|
|||||||
use komorebi_core::config_generation::MatchingStrategy;
|
use komorebi_core::config_generation::MatchingStrategy;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::ser::Error;
|
|
||||||
use serde::ser::SerializeStruct;
|
use serde::ser::SerializeStruct;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
@@ -97,24 +96,23 @@ impl Serialize for Window {
|
|||||||
"title",
|
"title",
|
||||||
&self
|
&self
|
||||||
.title()
|
.title()
|
||||||
.map_err(|_| S::Error::custom("could not get window title"))?,
|
.unwrap_or_else(|_| String::from("could not get window title")),
|
||||||
)?;
|
)?;
|
||||||
state.serialize_field(
|
state.serialize_field(
|
||||||
"exe",
|
"exe",
|
||||||
&self
|
&self
|
||||||
.exe()
|
.exe()
|
||||||
.map_err(|_| S::Error::custom("could not get window exe"))?,
|
.unwrap_or_else(|_| String::from("could not get window exe")),
|
||||||
)?;
|
)?;
|
||||||
state.serialize_field(
|
state.serialize_field(
|
||||||
"class",
|
"class",
|
||||||
&self
|
&self
|
||||||
.class()
|
.class()
|
||||||
.map_err(|_| S::Error::custom("could not get window class"))?,
|
.unwrap_or_else(|_| String::from("could not get window class")),
|
||||||
)?;
|
)?;
|
||||||
state.serialize_field(
|
state.serialize_field(
|
||||||
"rect",
|
"rect",
|
||||||
&WindowsApi::window_rect(self.hwnd())
|
&WindowsApi::window_rect(self.hwnd()).unwrap_or_default(),
|
||||||
.map_err(|_| S::Error::custom("could not get window rect"))?,
|
|
||||||
)?;
|
)?;
|
||||||
state.end()
|
state.end()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ impl WindowManager {
|
|||||||
target_workspace_idx: usize,
|
target_workspace_idx: usize,
|
||||||
to_move: &mut Vec<EnforceWorkspaceRuleOp>,
|
to_move: &mut Vec<EnforceWorkspaceRuleOp>,
|
||||||
) -> () {
|
) -> () {
|
||||||
tracing::info!(
|
tracing::trace!(
|
||||||
"{} should be on monitor {}, workspace {}",
|
"{} should be on monitor {}, workspace {}",
|
||||||
window_title,
|
window_title,
|
||||||
target_monitor_idx,
|
target_monitor_idx,
|
||||||
|
|||||||
Reference in New Issue
Block a user