diff --git a/docs/cli/alt-focus-hack.md b/docs/cli/alt-focus-hack.md deleted file mode 100644 index 8d2867bd..00000000 --- a/docs/cli/alt-focus-hack.md +++ /dev/null @@ -1,16 +0,0 @@ -# alt-focus-hack - -``` -DEPRECATED since v0.1.22 - -Usage: komorebic.exe alt-focus-hack - -Arguments: - - [possible values: enable, disable] - -Options: - -h, --help - Print help - -``` diff --git a/docs/cli/identify-border-overflow-application.md b/docs/cli/identify-border-overflow-application.md deleted file mode 100644 index 4c102e28..00000000 --- a/docs/cli/identify-border-overflow-application.md +++ /dev/null @@ -1,19 +0,0 @@ -# identify-border-overflow-application - -``` -Identify an application that has overflowing borders - -Usage: komorebic.exe identify-border-overflow-application - -Arguments: - - [possible values: exe, class, title, path] - - - Identifier as a string - -Options: - -h, --help - Print help - -``` diff --git a/komorebi-core/src/config_generation.rs b/komorebi-core/src/config_generation.rs index 90cc1e79..abb593c1 100644 --- a/komorebi-core/src/config_generation.rs +++ b/komorebi-core/src/config_generation.rs @@ -16,7 +16,6 @@ use crate::ApplicationIdentifier; pub enum ApplicationOptions { ObjectNameChange, Layered, - BorderOverflow, TrayAndMultiWindow, Force, } @@ -31,9 +30,6 @@ impl ApplicationOptions { ApplicationOptions::Layered => { format!("komorebic.exe identify-layered-application {kind} \"{id}\"",) } - ApplicationOptions::BorderOverflow => { - format!("komorebic.exe identify-border-overflow-application {kind} \"{id}\"",) - } ApplicationOptions::TrayAndMultiWindow => { format!("komorebic.exe identify-tray-application {kind} \"{id}\"",) } diff --git a/komorebi/src/lib.rs b/komorebi/src/lib.rs index 3f6e9387..9cea698a 100644 --- a/komorebi/src/lib.rs +++ b/komorebi/src/lib.rs @@ -149,7 +149,6 @@ lazy_static! { static ref PERMAIGNORE_CLASSES: Arc>> = Arc::new(Mutex::new(vec![ "Chrome_RenderWidgetHostHWND".to_string(), ])); - static ref BORDER_OVERFLOW_IDENTIFIERS: Arc>> = Arc::new(Mutex::new(vec![])); static ref WSL2_UI_PROCESSES: Arc>> = Arc::new(Mutex::new(vec![ "X410.exe".to_string(), "vcxsrv.exe".to_string(), diff --git a/komorebi/src/process_command.rs b/komorebi/src/process_command.rs index ce371bc8..f4c00bfc 100644 --- a/komorebi/src/process_command.rs +++ b/komorebi/src/process_command.rs @@ -57,7 +57,6 @@ use crate::BORDER_ENABLED; use crate::BORDER_HIDDEN; use crate::BORDER_HWND; use crate::BORDER_OFFSET; -use crate::BORDER_OVERFLOW_IDENTIFIERS; use crate::BORDER_WIDTH; use crate::CUSTOM_FFM; use crate::DATA_DIR; @@ -1026,26 +1025,6 @@ impl WindowManager { SocketMessage::WatchConfiguration(enable) => { self.watch_configuration(enable)?; } - SocketMessage::IdentifyBorderOverflowApplication(identifier, ref id) => { - let mut identifiers = BORDER_OVERFLOW_IDENTIFIERS.lock(); - - let mut should_push = true; - for i in &*identifiers { - if let MatchingRule::Simple(i) = i { - if i.id.eq(id) { - should_push = false; - } - } - } - - if should_push { - identifiers.push(MatchingRule::Simple(IdWithIdentifier { - kind: identifier, - id: id.clone(), - matching_strategy: Option::from(MatchingStrategy::Legacy), - })); - } - } SocketMessage::IdentifyObjectNameChangeApplication(identifier, ref id) => { let mut identifiers = OBJECT_NAME_CHANGE_ON_LAUNCH.lock(); @@ -1270,9 +1249,6 @@ impl WindowManager { BORDER_OFFSET.store(offset, Ordering::SeqCst); WindowsApi::invalidate_border_rect()?; } - SocketMessage::AltFocusHack(_) => { - tracing::info!("this action is deprecated"); - } SocketMessage::ApplicationSpecificConfigurationSchema => { let asc = schema_for!(Vec); let schema = serde_json::to_string_pretty(&asc)?; @@ -1320,6 +1296,9 @@ impl WindowManager { REMOVE_TITLEBARS.store(!current, Ordering::SeqCst); self.update_focused_workspace(false)?; } + // Deprecated commands + SocketMessage::AltFocusHack(_) + | SocketMessage::IdentifyBorderOverflowApplication(_, _) => {} }; match message { diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index f7199a58..badcf71d 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -15,7 +15,6 @@ use crate::BORDER_COLOUR_STACK; use crate::BORDER_ENABLED; use crate::BORDER_HWND; use crate::BORDER_OFFSET; -use crate::BORDER_OVERFLOW_IDENTIFIERS; use crate::BORDER_WIDTH; use crate::DATA_DIR; use crate::DEFAULT_CONTAINER_PADDING; @@ -500,7 +499,6 @@ impl StaticConfig { let mut regex_identifiers = REGEX_IDENTIFIERS.lock(); let mut manage_identifiers = MANAGE_IDENTIFIERS.lock(); let mut tray_and_multi_window_identifiers = TRAY_AND_MULTI_WINDOW_IDENTIFIERS.lock(); - let mut border_overflow_identifiers = BORDER_OVERFLOW_IDENTIFIERS.lock(); let mut object_name_change_identifiers = OBJECT_NAME_CHANGE_ON_LAUNCH.lock(); let mut layered_identifiers = LAYERED_WHITELIST.lock(); @@ -524,14 +522,6 @@ impl StaticConfig { populate_rules(rules, &mut layered_identifiers, &mut regex_identifiers)?; } - if let Some(rules) = &mut self.border_overflow_applications { - populate_rules( - rules, - &mut border_overflow_identifiers, - &mut regex_identifiers, - )?; - } - if let Some(rules) = &mut self.tray_and_multi_window_applications { populate_rules( rules, @@ -595,13 +585,6 @@ impl StaticConfig { &mut regex_identifiers, )?; } - ApplicationOptions::BorderOverflow => { - populate_option( - &mut entry, - &mut border_overflow_identifiers, - &mut regex_identifiers, - )?; - } ApplicationOptions::TrayAndMultiWindow => { populate_option( &mut entry, diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index d2067466..b5c50ef6 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -49,7 +49,6 @@ use crate::windows_api::WindowsApi; use crate::winevent_listener; use crate::workspace::Workspace; use crate::BORDER_HWND; -use crate::BORDER_OVERFLOW_IDENTIFIERS; use crate::DATA_DIR; use crate::DISPLAY_INDEX_PREFERENCES; use crate::FLOAT_IDENTIFIERS; @@ -101,7 +100,6 @@ pub struct State { pub manage_identifiers: Vec, pub layered_whitelist: Vec, pub tray_and_multi_window_identifiers: Vec, - pub border_overflow_identifiers: Vec, pub name_change_on_launch_identifiers: Vec, pub monitor_index_preferences: HashMap, pub display_index_preferences: HashMap, @@ -130,7 +128,6 @@ impl From<&WindowManager> for State { manage_identifiers: MANAGE_IDENTIFIERS.lock().clone(), layered_whitelist: LAYERED_WHITELIST.lock().clone(), tray_and_multi_window_identifiers: TRAY_AND_MULTI_WINDOW_IDENTIFIERS.lock().clone(), - border_overflow_identifiers: BORDER_OVERFLOW_IDENTIFIERS.lock().clone(), name_change_on_launch_identifiers: OBJECT_NAME_CHANGE_ON_LAUNCH.lock().clone(), monitor_index_preferences: MONITOR_INDEX_PREFERENCES.lock().clone(), display_index_preferences: DISPLAY_INDEX_PREFERENCES.lock().clone(), diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index 87be88ad..0afac118 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -1125,7 +1125,7 @@ enum SubCommand { /// Toggle title bars for whitelisted applications ToggleTitleBars, /// Identify an application that has overflowing borders - #[clap(arg_required_else_help = true)] + #[clap(hide = true)] #[clap(alias = "identify-border-overflow")] IdentifyBorderOverflowApplication(IdentifyBorderOverflowApplication), /// Enable or disable the active window border @@ -2063,9 +2063,6 @@ Stop-Process -Name:whkd -ErrorAction SilentlyContinue SubCommand::CompleteConfiguration => { send_message(&SocketMessage::CompleteConfiguration.as_bytes()?)?; } - SubCommand::AltFocusHack(arg) => { - send_message(&SocketMessage::AltFocusHack(arg.boolean_state.into()).as_bytes()?)?; - } SubCommand::IdentifyObjectNameChangeApplication(target) => { send_message( &SocketMessage::IdentifyObjectNameChangeApplication(target.identifier, target.id) @@ -2083,12 +2080,6 @@ Stop-Process -Name:whkd -ErrorAction SilentlyContinue .as_bytes()?, )?; } - SubCommand::IdentifyBorderOverflowApplication(target) => { - send_message( - &SocketMessage::IdentifyBorderOverflowApplication(target.identifier, target.id) - .as_bytes()?, - )?; - } SubCommand::RemoveTitleBar(target) => { match target.identifier { ApplicationIdentifier::Exe => {} @@ -2280,6 +2271,10 @@ Stop-Process -Name:whkd -ErrorAction SilentlyContinue SubCommand::GenerateStaticConfig => { print_query(&SocketMessage::GenerateStaticConfig.as_bytes()?); } + // Deprecated + SubCommand::AltFocusHack(_) | SubCommand::IdentifyBorderOverflowApplication(_) => { + println!("Command deprecated - this is now automatically handled by komorebi! 🎉"); + } } Ok(()) diff --git a/mkdocs.yml b/mkdocs.yml index df4aa484..11c433a6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -181,7 +181,6 @@ nav: - cli/identify-layered-application.md - cli/remove-title-bar.md - cli/toggle-title-bars.md - - cli/identify-border-overflow-application.md - cli/active-window-border.md - cli/active-window-border-colour.md - cli/active-window-border-width.md