mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
style: cargo +nightly fmt --all
This commit is contained in:
@@ -201,7 +201,6 @@ impl WindowManager {
|
|||||||
let mut already_moved_window_handles = self.already_moved_window_handles.lock();
|
let mut already_moved_window_handles = self.already_moved_window_handles.lock();
|
||||||
|
|
||||||
already_moved_window_handles.remove(&window.hwnd);
|
already_moved_window_handles.remove(&window.hwnd);
|
||||||
|
|
||||||
}
|
}
|
||||||
WindowManagerEvent::FocusChange(_, window) => {
|
WindowManagerEvent::FocusChange(_, window) => {
|
||||||
let workspace = self.focused_workspace_mut()?;
|
let workspace = self.focused_workspace_mut()?;
|
||||||
|
|||||||
@@ -498,8 +498,7 @@ impl WindowManager {
|
|||||||
// And all the visible windows (at the top of a container)
|
// And all the visible windows (at the top of a container)
|
||||||
for window in workspace.visible_windows().into_iter().flatten() {
|
for window in workspace.visible_windows().into_iter().flatten() {
|
||||||
// TODO this function needs some TLC
|
// TODO this function needs some TLC
|
||||||
let mut already_moved_window_handles =
|
let mut already_moved_window_handles = self.already_moved_window_handles.lock();
|
||||||
self.already_moved_window_handles.lock();
|
|
||||||
// If the executable names or titles of any of those windows are in our rules map
|
// If the executable names or titles of any of those windows are in our rules map
|
||||||
if let Some((monitor_idx, workspace_idx, apply_on_first_show_only)) =
|
if let Some((monitor_idx, workspace_idx, apply_on_first_show_only)) =
|
||||||
workspace_rules.get(&window.exe()?)
|
workspace_rules.get(&window.exe()?)
|
||||||
@@ -513,8 +512,7 @@ impl WindowManager {
|
|||||||
*workspace_idx
|
*workspace_idx
|
||||||
);
|
);
|
||||||
|
|
||||||
already_moved_window_handles
|
already_moved_window_handles.insert(window.hwnd);
|
||||||
.insert(window.hwnd);
|
|
||||||
|
|
||||||
// Create an operation outline and save it for later in the fn
|
// Create an operation outline and save it for later in the fn
|
||||||
to_move.push(EnforceWorkspaceRuleOp {
|
to_move.push(EnforceWorkspaceRuleOp {
|
||||||
@@ -554,8 +552,7 @@ impl WindowManager {
|
|||||||
*workspace_idx
|
*workspace_idx
|
||||||
);
|
);
|
||||||
|
|
||||||
already_moved_window_handles
|
already_moved_window_handles.insert(window.hwnd);
|
||||||
.insert(window.hwnd);
|
|
||||||
to_move.push(EnforceWorkspaceRuleOp {
|
to_move.push(EnforceWorkspaceRuleOp {
|
||||||
hwnd: window.hwnd,
|
hwnd: window.hwnd,
|
||||||
origin_monitor_idx: i,
|
origin_monitor_idx: i,
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ struct WorkspaceRule {
|
|||||||
monitor: usize,
|
monitor: usize,
|
||||||
/// Workspace index on the specified monitor (zero-indexed)
|
/// Workspace index on the specified monitor (zero-indexed)
|
||||||
workspace: usize,
|
workspace: usize,
|
||||||
#[clap(short,long)]
|
#[clap(short, long)]
|
||||||
/// Only apply once on first app load
|
/// Only apply once on first app load
|
||||||
apply_on_first_show_only: bool,
|
apply_on_first_show_only: bool,
|
||||||
}
|
}
|
||||||
@@ -538,7 +538,7 @@ struct NamedWorkspaceRule {
|
|||||||
id: String,
|
id: String,
|
||||||
/// Name of a workspace
|
/// Name of a workspace
|
||||||
workspace: String,
|
workspace: String,
|
||||||
#[clap(short,long)]
|
#[clap(short, long)]
|
||||||
/// Only apply once on first app load
|
/// Only apply once on first app load
|
||||||
apply_on_first_show_only: bool,
|
apply_on_first_show_only: bool,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user