Skip to content

Commit

Permalink
style: cargo +nightly fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
alvint91 authored and LGUG2Z committed Apr 30, 2023
1 parent 4306a7b commit b273617
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion komorebi/src/process_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ impl WindowManager {
let mut already_moved_window_handles = self.already_moved_window_handles.lock();

already_moved_window_handles.remove(&window.hwnd);

}
WindowManagerEvent::FocusChange(_, window) => {
let workspace = self.focused_workspace_mut()?;
Expand Down
9 changes: 3 additions & 6 deletions komorebi/src/window_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ impl WindowManager {
// And all the visible windows (at the top of a container)
for window in workspace.visible_windows().into_iter().flatten() {
// TODO this function needs some TLC
let mut already_moved_window_handles =
self.already_moved_window_handles.lock();
let mut already_moved_window_handles = self.already_moved_window_handles.lock();
// 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)) =
workspace_rules.get(&window.exe()?)
Expand All @@ -513,8 +512,7 @@ impl WindowManager {
*workspace_idx
);

already_moved_window_handles
.insert(window.hwnd);
already_moved_window_handles.insert(window.hwnd);

// Create an operation outline and save it for later in the fn
to_move.push(EnforceWorkspaceRuleOp {
Expand Down Expand Up @@ -554,8 +552,7 @@ impl WindowManager {
*workspace_idx
);

already_moved_window_handles
.insert(window.hwnd);
already_moved_window_handles.insert(window.hwnd);
to_move.push(EnforceWorkspaceRuleOp {
hwnd: window.hwnd,
origin_monitor_idx: i,
Expand Down
4 changes: 2 additions & 2 deletions komorebic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ struct WorkspaceRule {
monitor: usize,
/// Workspace index on the specified monitor (zero-indexed)
workspace: usize,
#[clap(short,long)]
#[clap(short, long)]
/// Only apply once on first app load
apply_on_first_show_only: bool,
}
Expand All @@ -538,7 +538,7 @@ struct NamedWorkspaceRule {
id: String,
/// Name of a workspace
workspace: String,
#[clap(short,long)]
#[clap(short, long)]
/// Only apply once on first app load
apply_on_first_show_only: bool,
}
Expand Down

0 comments on commit b273617

Please sign in to comment.