mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-19 15:21:28 +02:00
feat(wm): add cmd to identify 'close to tray' apps
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
This commit is contained in:
@@ -57,6 +57,7 @@ pub enum SocketMessage {
|
||||
FloatClass(String),
|
||||
FloatExe(String),
|
||||
FloatTitle(String),
|
||||
IdentifyTrayApplication(ApplicationIdentifier, String),
|
||||
State,
|
||||
FocusFollowsMouse(bool),
|
||||
}
|
||||
@@ -79,6 +80,13 @@ impl FromStr for SocketMessage {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, Display, EnumString)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum ApplicationIdentifier {
|
||||
Exe,
|
||||
Class,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
#[derive(Clap)]
|
||||
|
||||
Reference in New Issue
Block a user