hyprland_ipc/
params.rs

1use std::fmt::Display;
2
3pub enum Window {
4    ClassRegex(String),
5    TitleRegex(String),
6    Pid(i32),
7    Address(String),
8    Floating,
9    Tiled,
10}
11
12impl Display for Window {
13    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14        match self {
15            Window::ClassRegex(class_regex) => write!(f, "{class_regex}"),
16            Window::TitleRegex(title_regex) => write!(f, "title:{title_regex}"),
17            Window::Pid(pid) => write!(f, "pid:{pid}"),
18            Window::Address(address) => write!(f, "address:{address}"),
19            Window::Floating => write!(f, "floating"),
20            Window::Tiled => write!(f, "tiled"),
21        }
22    }
23}