1
0
Fork 0
forked from wry/wry

config: add visibility window criteria

This commit is contained in:
Julian Orth 2025-05-01 18:35:29 +02:00
parent 8bb8b2a649
commit dcf57db3df
14 changed files with 50 additions and 3 deletions

View file

@ -111,6 +111,7 @@ pub enum WindowCriterionIpc {
Types(WindowType),
Client(ClientMatcher),
Floating,
Visible,
}
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]

View file

@ -1658,6 +1658,7 @@ impl ConfigClient {
WindowCriterion::AppId(t) => string!(t, AppId, false),
WindowCriterion::AppIdRegex(t) => string!(t, AppId, true),
WindowCriterion::Floating => WindowCriterionIpc::Floating,
WindowCriterion::Visible => WindowCriterionIpc::Visible,
};
let res = self.send_with_response(&ClientMessage::CreateWindowMatcher { criterion });
get_response!(

View file

@ -246,6 +246,8 @@ pub enum WindowCriterion<'a> {
AppIdRegex(&'a str),
/// Matches if the window is floating.
Floating,
/// Matches if the window is visible.
Visible,
}
impl WindowCriterion<'_> {