swayipc_command_builder/commands/
gaps.rs

1use super::*;
2
3impl Command<Gaps> {
4    pub fn inner(self) -> Command<Gaps<Select>> {
5        self.push_str("inner").transmute()
6    }
7
8    pub fn outer(self) -> Command<Gaps<Select>> {
9        self.push_str("outer").transmute()
10    }
11
12    pub fn horizontal(self) -> Command<Gaps<Select>> {
13        self.push_str("horizontal").transmute()
14    }
15
16    pub fn vertical(self) -> Command<Gaps<Select>> {
17        self.push_str("vertical").transmute()
18    }
19
20    pub fn top(self) -> Command<Gaps<Select>> {
21        self.push_str("top").transmute()
22    }
23
24    pub fn right(self) -> Command<Gaps<Select>> {
25        self.push_str("right").transmute()
26    }
27
28    pub fn bottom(self) -> Command<Gaps<Select>> {
29        self.push_str("bottom").transmute()
30    }
31
32    pub fn left(self) -> Command<Gaps<Select>> {
33        self.push_str("left").transmute()
34    }
35}
36
37impl Command<Gaps<Select>> {
38    pub fn all(self) -> Command<Gaps<Select<With>>> {
39        self.push_str("all").transmute()
40    }
41
42    pub fn current(self) -> Command<Gaps<Select<With>>> {
43        self.push_str("current").transmute()
44    }
45}
46
47impl Command<Gaps<Select<With>>> {
48    pub fn set(self) -> Command<Gaps<Select<With<X>>>> {
49        self.push_str("set").transmute()
50    }
51
52    pub fn plus(self) -> Command<Gaps<Select<With<X>>>> {
53        self.push_str("plus").transmute()
54    }
55
56    pub fn minus(self) -> Command<Gaps<Select<With<X>>>> {
57        self.push_str("minus").transmute()
58    }
59}
60
61impl Command<Gaps<Select<With<X>>>> {
62    pub fn amount(self, amount: usize) -> Command<Valid> {
63        self.push_str(amount.to_string()).transmute()
64    }
65}