config: add visibility window criteria
This commit is contained in:
parent
8bb8b2a649
commit
dcf57db3df
14 changed files with 50 additions and 3 deletions
|
|
@ -111,6 +111,7 @@ pub enum WindowCriterionIpc {
|
|||
Types(WindowType),
|
||||
Client(ClientMatcher),
|
||||
Floating,
|
||||
Visible,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
|
|
|
|||
|
|
@ -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!(
|
||||
|
|
|
|||
|
|
@ -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<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue