1
0
Fork 0
forked from wry/wry

config: add urgency window criteria

This commit is contained in:
Julian Orth 2025-05-01 18:38:57 +02:00
parent dcf57db3df
commit eb172e9d8c
15 changed files with 56 additions and 5 deletions

View file

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

View file

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

View file

@ -248,6 +248,8 @@ pub enum WindowCriterion<'a> {
Floating,
/// Matches if the window is visible.
Visible,
/// Matches if the window has the urgency flag set.
Urgent,
}
impl WindowCriterion<'_> {