swayipc_command_builder/commands/
client.rs

1use super::*;
2
3impl Command<Client> {
4    pub fn background(self) -> Command<Client<I3>> {
5        self.push_str_without_space("background").transmute()
6    }
7
8    pub fn focused(self) -> Command<Client<With>> {
9        self.push_str_without_space("focused").transmute()
10    }
11
12    pub fn focused_inactive(self) -> Command<Client<With>> {
13        self.push_str_without_space("focused_inactive").transmute()
14    }
15
16    pub fn placeholder(self) -> Command<Client<With>> {
17        self.push_str_without_space("placeholder").transmute()
18    }
19
20    pub fn unfocused(self) -> Command<Client<With>> {
21        self.push_str_without_space("unfocused").transmute()
22    }
23
24    pub fn urgent(self) -> Command<Client<With>> {
25        self.push_str_without_space("urgent").transmute()
26    }
27}
28
29impl Command<Client<I3>> {
30    pub fn color(self, val: impl AsRef<str>) -> Command<Valid> {
31        self.push_str(val).transmute()
32    }
33}
34
35impl Command<Client<With>> {
36    pub fn border(self, color: impl AsRef<str>) -> Command<Client<Border>> {
37        self.push_str(color).transmute()
38    }
39}
40
41impl Command<Client<Border>> {
42    pub fn background(self, color: impl AsRef<str>) -> Command<Client<Background>> {
43        self.push_str(color).transmute()
44    }
45}
46
47impl Command<Client<Background>> {
48    pub fn text(self, color: impl AsRef<str>) -> Command<Valid<Client<Text>>> {
49        self.push_str(color).transmute()
50    }
51}
52
53impl Command<Valid<Client<Text>>> {
54    pub fn indicator(self, color: impl AsRef<str>) -> Command<Valid<Client<Indicator>>> {
55        self.push_str(color).transmute()
56    }
57}
58
59impl Command<Valid<Client<Indicator>>> {
60    pub fn child_border(self, color: impl AsRef<str>) -> Command<Valid> {
61        self.push_str(color).transmute()
62    }
63}