mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-18 23:44:00 +01:00
Issue #6 highlighted a workflow that I don't personally use, but I am sure is common among other Windows users, which is to use the Close button to minimize an application to the tray. Since this is largely a configurable option in those applications (Discord etc.), I have implemented a command for the user to identify those applications themselves when configuring the window manager, instead of adding them to the previous Vec of known multi-window applications that need to be identified by default. Close/minimize to tray applications can be identified either by their class or their executable name. I figure it is pretty important to know the rules defined on the window manager instance, so I have exposed these on a new window_manager::State struct which is now what get returns from the 'komorebic.exe state' command. resolve #6
26 lines
1.3 KiB
Rust
26 lines
1.3 KiB
Rust
fn main() {
|
|
windows::build!(
|
|
Windows::Win32::Foundation::RECT,
|
|
Windows::Win32::Foundation::POINT,
|
|
Windows::Win32::Foundation::BOOL,
|
|
Windows::Win32::Foundation::PWSTR,
|
|
Windows::Win32::Foundation::HWND,
|
|
Windows::Win32::Foundation::LPARAM,
|
|
// error: `Windows.Win32.Graphics.Dwm.DWMWA_CLOAKED` not found in metadata
|
|
Windows::Win32::Graphics::Dwm::*,
|
|
// error: `Windows.Win32.Graphics.Gdi.MONITOR_DEFAULTTONEAREST` not found in metadata
|
|
Windows::Win32::Graphics::Gdi::*,
|
|
Windows::Win32::System::Threading::PROCESS_ACCESS_RIGHTS,
|
|
Windows::Win32::System::Threading::PROCESS_NAME_FORMAT,
|
|
Windows::Win32::System::Threading::OpenProcess,
|
|
Windows::Win32::System::Threading::QueryFullProcessImageNameW,
|
|
Windows::Win32::System::Threading::GetCurrentThreadId,
|
|
Windows::Win32::System::Threading::AttachThreadInput,
|
|
Windows::Win32::System::Threading::GetCurrentProcessId,
|
|
Windows::Win32::UI::KeyboardAndMouseInput::SetFocus,
|
|
Windows::Win32::UI::Accessibility::{SetWinEventHook, HWINEVENTHOOK},
|
|
// error: `Windows.Win32.UI.WindowsAndMessaging.GWL_EXSTYLE` not found in metadata
|
|
Windows::Win32::UI::WindowsAndMessaging::*,
|
|
);
|
|
}
|